seeder

package
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SeedApis

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

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

func SeedArtifacts

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

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

func SeedDeployments

func SeedDeployments(ctx context.Context, s Registry, deployments ...*rpc.ApiDeployment) error

SeedDeployments is a convenience function for calling SeedRegistry with only ApiDeployment messages.

func SeedProjects

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

SeedProjects is a convenience function for calling SeedRegistry with only Project messages.

func SeedRegistry

func SeedRegistry(ctx context.Context, s Registry, resources ...RegistryResource) error

SeedRegistry initializes registry with the provided resources. Resources are created implicitly if they are needed but aren't explicitly provided.

Supported resource types are Project, Api, ApiVersion, ApiSpec, ApiDeployment, and Artifact.

func SeedSpecs

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

SeedSpecs is a convenience function for calling SeedRegistry with only ApiSpec messages.

func SeedVersions

func SeedVersions(ctx context.Context, s Registry, versions ...*rpc.ApiVersion) error

SeedVersions is a convenience function for calling SeedRegistry with only ApiVersion messages.

Types

type Client

type Client struct {
	*gapic.RegistryClient
	*gapic.AdminClient
}

func (Client) CreateArtifact

func (c Client) CreateArtifact(ctx context.Context, req *rpc.CreateArtifactRequest) (*rpc.Artifact, error)

func (Client) CreateProject

func (c Client) CreateProject(ctx context.Context, req *rpc.CreateProjectRequest) (*rpc.Project, error)

func (Client) ReplaceArtifact added in v0.5.2

func (c Client) ReplaceArtifact(ctx context.Context, req *rpc.ReplaceArtifactRequest) (*rpc.Artifact, error)

func (Client) UpdateApi added in v0.5.2

func (c Client) UpdateApi(ctx context.Context, req *rpc.UpdateApiRequest) (*rpc.Api, error)

func (Client) UpdateApiDeployment

func (c Client) UpdateApiDeployment(ctx context.Context, req *rpc.UpdateApiDeploymentRequest) (*rpc.ApiDeployment, error)

func (Client) UpdateApiSpec

func (c Client) UpdateApiSpec(ctx context.Context, req *rpc.UpdateApiSpecRequest) (*rpc.ApiSpec, error)

func (Client) UpdateApiVersion added in v0.5.2

func (c Client) UpdateApiVersion(ctx context.Context, req *rpc.UpdateApiVersionRequest) (*rpc.ApiVersion, error)

type Registry

Registry is an interface containing methods necessary for seeding Registry resources.

type RegistryResource

type RegistryResource interface {
	GetName() string
}

RegistryResource is an interface that any seedable resource will implement.

Jump to

Keyboard shortcuts

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