Documentation ¶
Index ¶
- func SeedApis(ctx context.Context, s rpc.RegistryServer, apis ...*rpc.Api) error
- func SeedArtifacts(ctx context.Context, s rpc.RegistryServer, artifacts ...*rpc.Artifact) error
- func SeedProjects(ctx context.Context, s rpc.RegistryServer, projects ...*rpc.Project) error
- func SeedRegistry(ctx context.Context, s rpc.RegistryServer, resources ...RegistryResource) error
- func SeedSpecs(ctx context.Context, s rpc.RegistryServer, specs ...*rpc.ApiSpec) error
- func SeedVersions(ctx context.Context, s rpc.RegistryServer, versions ...*rpc.ApiVersion) error
- type RegistryResource
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SeedArtifacts ¶
SeedArtifacts is a convenience function for calling SeedRegistry with only Artifact messages.
func SeedProjects ¶
SeedProjects is a convenience function for calling SeedRegistry with only Project messages.
func SeedRegistry ¶
func SeedRegistry(ctx context.Context, s rpc.RegistryServer, resources ...RegistryResource) error
SeedRegistry initializes registry with the provided resources. Resources are created implicitly if they are needed but aren't explicitly provided. Resources can be provided in any order. They will be created according to their position in the resource hierarchy.
ApiSpecs with the same name can be provided to create multiple revisions of the same spec. Each revision can be tagged by providing a list of tags in the `revision_tags` field.
Resource names must be unique with the exception of ApiSpec resources. Supported resource types are Project, Api, ApiVersion, ApiSpec, and Artifact.
func SeedSpecs ¶
SeedSpecs is a convenience function for calling SeedRegistry with only ApiSpec messages.
func SeedVersions ¶
func SeedVersions(ctx context.Context, s rpc.RegistryServer, versions ...*rpc.ApiVersion) error
SeedVersions is a convenience function for calling SeedRegistry with only ApiVersion messages.
Types ¶
type RegistryResource ¶
type RegistryResource interface {
GetName() string
}
RegistryResource is an interface that any seedable resource will implement. The resource name is used to determine the hierarchical ordering of resources for seeding.