Documentation ¶
Index ¶
- Constants
- Variables
- func GetProviderVersionsSchema(table string) *dynamodb.CreateTableInput
- func NewVersionManagerGrpcClient(endpoint string) services.VersionManagerClient
- type Provider
- type VersionManagerService
- func (s *VersionManagerService) AbortProviderVersion(ctx context.Context, request *services.TerminateVersionRequest) (*terrarium.Response, error)
- func (s *VersionManagerService) GetProvider(ctx context.Context, request *services.ProviderName) (*services.GetProviderResponse, error)
- func (s *VersionManagerService) GetProviderKey(provider *terrarium.Provider) (map[string]types.AttributeValue, error)
- func (s *VersionManagerService) GetVersionData(ctx context.Context, request *services.VersionDataRequest) (*services.PlatformMetadataResponse, error)
- func (s *VersionManagerService) ListProviderVersions(ctx context.Context, request *services.ProviderName) (*services.ProviderVersionsResponse, error)
- func (s *VersionManagerService) ListProviders(ctx context.Context, request *services.ListProvidersRequest) (*services.ListProvidersResponse, error)
- func (s *VersionManagerService) PublishVersion(ctx context.Context, request *services.TerminateVersionRequest) (*terrarium.Response, error)
- func (s *VersionManagerService) Register(ctx context.Context, request *terrarium.RegisterProviderRequest) (*terrarium.Response, error)
- func (s *VersionManagerService) RegisterWithServer(grpcServer grpc.ServiceRegistrar) error
Constants ¶
View Source
const ( DefaultProviderVersionsTableName = "terrarium-providers" DefaultProviderVersionManagerEndpoint = "provider_version_manager:3001" )
Variables ¶
View Source
var ( VersionsTableName = DefaultProviderVersionsTableName VersionManagerEndpoint = DefaultProviderVersionManagerEndpoint ProviderRegistered = &terrarium.Response{Message: "Provider registered successfully."} VersionPublished = &terrarium.Response{Message: "Version published."} VersionAborted = &terrarium.Response{Message: "Version aborted."} ProviderVersionsTableInitializationError = status.Error(codes.Unknown, "Failed to initialize table for provider versions.") AbortProviderVersionError = status.Error(codes.Unknown, "Failed to abort provider version.") PublishProviderVersionError = status.Error(codes.Unknown, "Failed to publish provider version.") ProviderGetError = status.Error(codes.Unknown, "Failed to check if provider already exists.") ProviderUpdateError = status.Error(codes.Unknown, "Failed to update provider.") ProviderRegisterError = status.Error(codes.Unknown, "Failed to register provider.") ExpressionBuildError = status.Error(codes.Unknown, "Failed to build update expression.") MarshalProviderError = status.Error(codes.Unknown, "Failed to marshal provider.") )
Functions ¶
func GetProviderVersionsSchema ¶
func GetProviderVersionsSchema(table string) *dynamodb.CreateTableInput
GetProviderVersionsSchema returns CreateTableInput that can be used to create table if it does not exist
func NewVersionManagerGrpcClient ¶
func NewVersionManagerGrpcClient(endpoint string) services.VersionManagerClient
Types ¶
type Provider ¶
type Provider struct { Name string `json:"name" bson:"name" dynamodbav:"name"` Version string `json:"version" bson:"version" dynamodbav:"version"` Protocols []string `json:"protocols" bson:"protocols" dynamodbav:"protocols"` Platforms []*terrarium.PlatformItem `json:"platforms" bson:"platforms" dynamodbav:"platforms"` Description string `json:"description" bson:"description" dynamodbav:"description"` SourceRepoUrl string `json:"source_repo_url" bson:"source_repo_url" dynamodbav:"source_repo_url"` Maturity string `json:"maturity" bson:"maturity" dynamodbav:"maturity"` CreatedOn string `json:"created_on" bson:"created_on" dynamodbav:"created_on"` ModifiedOn string `json:"modified_on,omitempty" bson:"modified_on,omitempty" dynamodbav:"modified_on,omitempty"` PublishedOn string `json:"published_on,omitempty" bson:"published_on,omitempty" dynamodbav:"published_on,omitempty"` }
type VersionManagerService ¶
type VersionManagerService struct { services.UnimplementedVersionManagerServer Db storage.DynamoDBTableCreator Table string Schema *dynamodb.CreateTableInput }
func (*VersionManagerService) AbortProviderVersion ¶
func (s *VersionManagerService) AbortProviderVersion(ctx context.Context, request *services.TerminateVersionRequest) (*terrarium.Response, error)
AbortProviderVersion removes a Version of a Provider.
func (*VersionManagerService) GetProvider ¶
func (s *VersionManagerService) GetProvider(ctx context.Context, request *services.ProviderName) (*services.GetProviderResponse, error)
func (*VersionManagerService) GetProviderKey ¶
func (s *VersionManagerService) GetProviderKey(provider *terrarium.Provider) (map[string]types.AttributeValue, error)
func (*VersionManagerService) GetVersionData ¶
func (s *VersionManagerService) GetVersionData(ctx context.Context, request *services.VersionDataRequest) (*services.PlatformMetadataResponse, error)
func (*VersionManagerService) ListProviderVersions ¶
func (s *VersionManagerService) ListProviderVersions(ctx context.Context, request *services.ProviderName) (*services.ProviderVersionsResponse, error)
ListProviderVersions Retrieve all versions of a given provider and return an array of versionItems. Only versions that have been published should be reported.
func (*VersionManagerService) ListProviders ¶
func (s *VersionManagerService) ListProviders(ctx context.Context, request *services.ListProvidersRequest) (*services.ListProvidersResponse, error)
func (*VersionManagerService) PublishVersion ¶
func (s *VersionManagerService) PublishVersion(ctx context.Context, request *services.TerminateVersionRequest) (*terrarium.Response, error)
PublishVersion Updates Provider Version to published with Version Manager service
func (*VersionManagerService) Register ¶
func (s *VersionManagerService) Register(ctx context.Context, request *terrarium.RegisterProviderRequest) (*terrarium.Response, error)
Register new Provider in Terrarium
func (*VersionManagerService) RegisterWithServer ¶
func (s *VersionManagerService) RegisterWithServer(grpcServer grpc.ServiceRegistrar) error
RegisterWithServer Registers VersionManagerService with grpc server
Click to show internal directories.
Click to hide internal directories.