Documentation ¶
Index ¶
- func SeedApis(ctx context.Context, s Registry, apis ...*rpc.Api) error
- func SeedArtifacts(ctx context.Context, s Registry, artifacts ...*rpc.Artifact) error
- func SeedDeployments(ctx context.Context, s Registry, deployments ...*rpc.ApiDeployment) error
- func SeedProjects(ctx context.Context, s Registry, projects ...*rpc.Project) error
- func SeedRegistry(ctx context.Context, s Registry, resources ...RegistryResource) error
- func SeedSpecs(ctx context.Context, s Registry, specs ...*rpc.ApiSpec) error
- func SeedVersions(ctx context.Context, s Registry, versions ...*rpc.ApiVersion) error
- type Client
- func (c Client) CreateArtifact(ctx context.Context, req *rpc.CreateArtifactRequest) (*rpc.Artifact, error)
- func (c Client) CreateProject(ctx context.Context, req *rpc.CreateProjectRequest) (*rpc.Project, error)
- func (c Client) ReplaceArtifact(ctx context.Context, req *rpc.ReplaceArtifactRequest) (*rpc.Artifact, error)
- func (c Client) UpdateApi(ctx context.Context, req *rpc.UpdateApiRequest) (*rpc.Api, error)
- func (c Client) UpdateApiDeployment(ctx context.Context, req *rpc.UpdateApiDeploymentRequest) (*rpc.ApiDeployment, error)
- func (c Client) UpdateApiSpec(ctx context.Context, req *rpc.UpdateApiSpecRequest) (*rpc.ApiSpec, error)
- func (c Client) UpdateApiVersion(ctx context.Context, req *rpc.UpdateApiVersionRequest) (*rpc.ApiVersion, error)
- type Registry
- 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 SeedDeployments ¶
SeedDeployments is a convenience function for calling SeedRegistry with only ApiDeployment messages.
func SeedProjects ¶
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 ¶
SeedSpecs is a convenience function for calling SeedRegistry with only ApiSpec messages.
func SeedVersions ¶
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 (Client) CreateProject ¶
func (Client) ReplaceArtifact ¶ added in v0.5.2
func (Client) UpdateApiDeployment ¶
func (c Client) UpdateApiDeployment(ctx context.Context, req *rpc.UpdateApiDeploymentRequest) (*rpc.ApiDeployment, error)
func (Client) UpdateApiSpec ¶
func (Client) UpdateApiVersion ¶ added in v0.5.2
func (c Client) UpdateApiVersion(ctx context.Context, req *rpc.UpdateApiVersionRequest) (*rpc.ApiVersion, error)
type Registry ¶
type Registry interface { CreateProject(context.Context, *rpc.CreateProjectRequest) (*rpc.Project, error) UpdateApi(context.Context, *rpc.UpdateApiRequest) (*rpc.Api, error) UpdateApiVersion(context.Context, *rpc.UpdateApiVersionRequest) (*rpc.ApiVersion, error) UpdateApiSpec(context.Context, *rpc.UpdateApiSpecRequest) (*rpc.ApiSpec, error) UpdateApiDeployment(context.Context, *rpc.UpdateApiDeploymentRequest) (*rpc.ApiDeployment, error) CreateArtifact(context.Context, *rpc.CreateArtifactRequest) (*rpc.Artifact, error) ReplaceArtifact(context.Context, *rpc.ReplaceArtifactRequest) (*rpc.Artifact, error) }
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.