version_manager

package
v0.0.83 Latest Latest
Warning

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

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

Documentation

Index

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

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 (*VersionManagerService) GetProviderKey

func (s *VersionManagerService) GetProviderKey(provider *terrarium.Provider) (map[string]types.AttributeValue, error)

func (*VersionManagerService) GetVersionData

func (*VersionManagerService) ListProviderVersions

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 (*VersionManagerService) PublishVersion

PublishVersion Updates Provider Version to published with Version Manager service

func (*VersionManagerService) Register

Register new Provider in Terrarium

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