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) CreateApi(ctx context.Context, req *rpc.CreateApiRequest) (*rpc.Api, error)
- func (c Client) CreateApiVersion(ctx context.Context, req *rpc.CreateApiVersionRequest) (*rpc.ApiVersion, error)
- 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) UpdateApiDeployment(ctx context.Context, req *rpc.UpdateApiDeploymentRequest) (*rpc.ApiDeployment, error)
- func (c Client) UpdateApiSpec(ctx context.Context, req *rpc.UpdateApiSpecRequest) (*rpc.ApiSpec, 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) CreateApiVersion ¶
func (c Client) CreateApiVersion(ctx context.Context, req *rpc.CreateApiVersionRequest) (*rpc.ApiVersion, error)
func (Client) CreateArtifact ¶
func (Client) CreateProject ¶
func (Client) UpdateApiDeployment ¶
func (c Client) UpdateApiDeployment(ctx context.Context, req *rpc.UpdateApiDeploymentRequest) (*rpc.ApiDeployment, error)
func (Client) UpdateApiSpec ¶
type Registry ¶
type Registry interface { CreateProject(context.Context, *rpc.CreateProjectRequest) (*rpc.Project, error) CreateApi(context.Context, *rpc.CreateApiRequest) (*rpc.Api, error) CreateApiVersion(context.Context, *rpc.CreateApiVersionRequest) (*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) }
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.