Documentation ¶
Index ¶
- Constants
- Variables
- func GetModuleVersionsSchema(table string) *dynamodb.CreateTableInput
- func NewVersionManagerGrpcClient(endpoint string) services.VersionManagerClient
- type ModuleVersion
- type VersionManagerService
- func (s *VersionManagerService) AbortVersion(ctx context.Context, request *services.TerminateVersionRequest) (*terrarium.Response, error)
- func (s *VersionManagerService) BeginVersion(ctx context.Context, request *terrarium.BeginVersionRequest) (*terrarium.Response, error)
- func (s *VersionManagerService) GetModuleKey(module *terrarium.Module) (map[string]types.AttributeValue, error)
- func (s *VersionManagerService) ListModuleVersions(ctx context.Context, request *services.ListModuleVersionsRequest) (*services.ListModuleVersionsResponse, error)
- func (s *VersionManagerService) PublishVersion(ctx context.Context, request *services.TerminateVersionRequest) (*terrarium.Response, error)
- func (s *VersionManagerService) RegisterWithServer(grpcServer grpc.ServiceRegistrar) error
Constants ¶
View Source
const ( DefaultVersionsTableName = "terrarium-module-versions-ciedev-4757" DefaultVersionManagerEndpoint = "version_manager:3001" )
Variables ¶
View Source
var ( VersionsTableName = DefaultVersionsTableName VersionManagerEndpoint = DefaultVersionManagerEndpoint VersionCreated = &terrarium.Response{Message: "Version created."} VersionPublished = &terrarium.Response{Message: "Version published."} VersionAborted = &terrarium.Response{Message: "Version aborted."} ModuleVersionsTableInitializationError = status.Error(codes.Unknown, "Failed to initialize table for module versions.") MarshalModuleVersionError = status.Error(codes.Unknown, "Failed to marshal module version.") CreateModuleVersionError = status.Error(codes.Unknown, "Failed to create module version.") AbortModuleVersionError = status.Error(codes.Unknown, "Failed to abort module version.") PublishModuleVersionError = status.Error(codes.Unknown, "Failed to publish module version.") DevelopmentVersion = versions.MustParseVersion("0.0.0") )
Functions ¶
func GetModuleVersionsSchema ¶
func GetModuleVersionsSchema(table string) *dynamodb.CreateTableInput
GetModuleVersionsSchema returns CreateTableInput that can be used to create table if it does not exist
func NewVersionManagerGrpcClient ¶ added in v0.0.67
func NewVersionManagerGrpcClient(endpoint string) services.VersionManagerClient
Types ¶
type ModuleVersion ¶
type ModuleVersion struct { Name string `json:"name" bson:"name" dynamodbav:"name"` Version string `json:"version" bson:"version" dynamodbav:"version"` CreatedOn string `json:"created_on" bson:"created_on" dynamodbav:"created_on"` PublishedOn string `json:"published_on" bson:"published_on" dynamodbav:"published_on"` }
type VersionManagerService ¶
type VersionManagerService struct { services.UnimplementedVersionManagerServer Db storage.DynamoDBTableCreator Table string Schema *dynamodb.CreateTableInput ReleaseService releaseSvc.PublisherClient }
func (*VersionManagerService) AbortVersion ¶
func (s *VersionManagerService) AbortVersion(ctx context.Context, request *services.TerminateVersionRequest) (*terrarium.Response, error)
AbortVersion Removes Module Version with Version Manager service
func (*VersionManagerService) BeginVersion ¶
func (s *VersionManagerService) BeginVersion(ctx context.Context, request *terrarium.BeginVersionRequest) (*terrarium.Response, error)
BeginVersion Creates new Module Version with Version Manager service
func (*VersionManagerService) GetModuleKey ¶
func (s *VersionManagerService) GetModuleKey(module *terrarium.Module) (map[string]types.AttributeValue, error)
func (*VersionManagerService) ListModuleVersions ¶
func (s *VersionManagerService) ListModuleVersions(ctx context.Context, request *services.ListModuleVersionsRequest) (*services.ListModuleVersionsResponse, error)
ListModuleVersions Retrieve all versions of a given module and return an array of versions. Only versions that have been published should be reported
func (*VersionManagerService) PublishVersion ¶
func (s *VersionManagerService) PublishVersion(ctx context.Context, request *services.TerminateVersionRequest) (*terrarium.Response, error)
PublishVersion Updates Module Version to published with Version Manager service And publishes a release.
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.