Documentation ¶
Index ¶
Constants ¶
View Source
const ProjectConfigFilename = "solo-kit.json"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CustomResourceConfig ¶
type CustomResourceConfig struct { // the import path for the Go Type Package string `json:"package"` // the name of the Go Type Type string `json:"type"` PluralName string `json:"plural_name"` ShortName string `json:"short_name"` ClusterScoped bool `json:"cluster_scoped"` SkipHashingAnnotations bool `json:"skip_hashing_annotations"` // set by load Imported bool }
Create a Solo-Kit backed resource from a Go Type that implements the Resource Interface
type Field ¶
type Field struct { Name string TypeName string IsOneof bool // we ignore oneof fields in test generation SkipHashing bool // skip this field when hashing the resource Original *descriptor.FieldDescriptorProto }
type Project ¶
type Project struct { ProjectConfig ProjectConfig ProtoPackage string Resources []*Resource ResourceGroups []*ResourceGroup XDSResources []*XDSResource Request *plugin_go.CodeGeneratorRequest }
type ProjectConfig ¶
type ProjectConfig struct { Title string `json:"title"` Description string `json:"description"` Name string `json:"name"` Version string `json:"version"` DocsDir string `json:"docs_dir"` ResourceGroups map[string][]ResourceConfig `json:"resource_groups"` // if set, this group will override the proto pacakge typically used // as the api group for the crd CrdGroupOverride string `json:"crd_group_override"` // imported solokit projects Imports []string `json:"imports"` // define custom resources here CustomResources []CustomResourceConfig `json:"custom_resources"` // set by load if not specified GoPackage string `json:"go_package"` // set by load ProjectFile string ProjectProtos []string }
func LoadProjectConfig ¶
func LoadProjectConfig(path string) (ProjectConfig, error)
func (ProjectConfig) IsOurProto ¶
func (p ProjectConfig) IsOurProto(protoFile string) bool
type Resource ¶
type Resource struct { Name string PluralName string ShortName string ProtoPackage string // eg. gloo.solo.io // ImportPrefix will equal ProtoPackage+"." if the resource does not belong to the project // else it will be empty string. used in event loop files ImportPrefix string // empty unless resource is external // format "github.com/solo-io/solo-kit/foo/bar" GoPackage string HasStatus bool ClusterScoped bool // the resource lives at the cluster level, namespace is ignored SkipDocsGen bool // if true, no docs will be generated for the proto file where this resource is defined IsCustom bool // if true, this will be treated as a custom resource without a proto file behind it CustomResource CustomResourceConfig // this struct will be empty unless IsCustom is true CustomImportPrefix string // import prefix for the struct type the generated wrapper will wrap SkipHashingAnnotations bool // if true, zero out annotations in the generated hash func Fields []*Field Oneofs []*Oneof // resource groups i belong to ResourceGroups []*ResourceGroup // project i belong to Project *Project Filename string // the proto file where this resource is contained Version string // set during parsing from this resource's solo-kit.json // TODO (ilackarms): change to use descriptor.DescriptorProto Original *protokit.Descriptor }
type ResourceConfig ¶
type ResourceConfig struct { ResourceName string `json:"name"` ResourcePackage string `json:"package"` // resource package doubles as the proto package or the go import package ResourceVersion string `json:"version"` // version of the resource, used to distinguish when multiple versions of a resource exist }
type ResourceGroup ¶
Click to show internal directories.
Click to hide internal directories.