seeder

package
v0.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 1, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SeedApis

func SeedApis(ctx context.Context, s rpc.RegistryServer, apis ...*rpc.Api) error

SeedApis is a convenience function for calling SeedRegistry with only Api messages.

func SeedArtifacts

func SeedArtifacts(ctx context.Context, s rpc.RegistryServer, artifacts ...*rpc.Artifact) error

SeedArtifacts is a convenience function for calling SeedRegistry with only Artifact messages.

func SeedProjects

func SeedProjects(ctx context.Context, s rpc.RegistryServer, projects ...*rpc.Project) error

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

func SeedSpecs(ctx context.Context, s rpc.RegistryServer, specs ...*rpc.ApiSpec) error

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL