version_manager

package
v0.0.76-CIEDEV-3005.3 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultVersionsTableName      = "terrarium-module-versions"
	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

func (*VersionManagerService) AbortVersion

AbortVersion Removes Module Version with Version Manager service

func (*VersionManagerService) BeginVersion

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

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

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

Jump to

Keyboard shortcuts

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