48 references to GoApiItemKind
Aspire.Hosting.CodeGeneration.Go (21)
AtsGoCodeGenerator.ApiProjection.cs (11)
160Kind = GoApiItemKind.Type, 174Kind = GoApiItemKind.Function, 232Kind = GoApiItemKind.Function, 307AddGeneratedType(scope, GoApiItemKind.Enum, "enum", enumType.TypeId, owner, type, members, usedBy: []); 312AddGeneratedType(scope, GoApiItemKind.Dto, "dto", dtoType.TypeId, owner, type, members, usedBy: []); 317AddGeneratedType(scope, GoApiItemKind.Options, "options", $"{owner}/{type.Name}", owner, type, members, producer.UsedBy); 326GoApiItemKind kind, 434Kind = GoApiItemKind.Variable, 547Kind = GoApiItemKind.Interface, 596Kind = GoApiItemKind.Augmentation, 621Kind = GoApiItemKind.Interface,
GoApiExportWriter.cs (9)
196private static string ToKindString(GoApiItemKind kind) => kind switch 198GoApiItemKind.Interface => "interface", 199GoApiItemKind.Augmentation => "augmentation", 200GoApiItemKind.Dto => "dto", 201GoApiItemKind.Options => "options", 202GoApiItemKind.Enum => "enum", 203GoApiItemKind.Variable => "variable", 204GoApiItemKind.Function => "function", 205GoApiItemKind.Type => "type",
GoApiModel.cs (1)
315public required GoApiItemKind Kind { get; init; }
Aspire.Hosting.CodeGeneration.Go.Tests (27)
GoApiExportTests.cs (27)
107var builder = Assert.Single(items, item => item.Kind == GoApiItemKind.Augmentation && item.Name == "DistributedApplicationBuilder"); 112items.Where(item => item.Kind != GoApiItemKind.Augmentation), 118[GoApiItemKind.Interface, GoApiItemKind.Augmentation, GoApiItemKind.Dto, GoApiItemKind.Options, GoApiItemKind.Enum, GoApiItemKind.Variable], 134items.Where(item => item.Kind != GoApiItemKind.Augmentation), 170items.Where(item => item.Kind == GoApiItemKind.Interface), 175items.Where(item => item.Kind is GoApiItemKind.Dto or GoApiItemKind.Options), 281items.Where(item => item.Kind == GoApiItemKind.Function).Select(item => item.Name)); 288var typeItems = items.Where(item => IsTypeItem(item) && item.Kind != GoApiItemKind.Interface).ToList(); 303var interfaces = s_everything.Value.Modules.Single().Items.Where(item => item.Kind == GoApiItemKind.Interface).ToList(); 334var variables = s_everything.Value.Modules.Single().Items.Where(item => item.Kind == GoApiItemKind.Variable).ToList(); 392Assert.Contains(exported, item => item.Kind == GoApiItemKind.Augmentation && item.Members.Any(member => member.Name == "AddTestRedis")); 677.Where(item => item.Kind == GoApiItemKind.Type) 725=> item.Kind is GoApiItemKind.Interface or GoApiItemKind.Dto or GoApiItemKind.Options or GoApiItemKind.Enum or GoApiItemKind.Type; 895Kind = GoApiItemKind.Interface, 976Kind = GoApiItemKind.Options, 997Kind = GoApiItemKind.Enum, 1018Kind = GoApiItemKind.Augmentation,