registrar

package
v0.0.43 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultRegistrarTableName       = "terrarium-modules"
	DefaultRegistrarServiceEndpoint = "registrar:3001"
)

Variables

View Source
var (
	RegistrarTableName       = DefaultRegistrarTableName
	RegistrarServiceEndpoint = DefaultRegistrarServiceEndpoint

	ModuleRegistered = &terrarium.Response{Message: "Module registered successfully."}

	ModuleTableInitializationError = status.Error(codes.Unknown, "Failed to initialize table for modules.")
	ModuleGetError                 = status.Error(codes.Unknown, "Failed to check if module already exists.")
	ModuleUpdateError              = status.Error(codes.Unknown, "Failed to update module.")
	ModuleRegisterError            = status.Error(codes.Unknown, "Failed to register module.")
	ExpressionBuildError           = status.Error(codes.Unknown, "Failed to build update expression.")
	MarshalModuleError             = status.Error(codes.Unknown, "Failed to marshal module.")
)

Functions

func GetModulesSchema

func GetModulesSchema(table string) *dynamodb.CreateTableInput

GetModulesSchema returns CreateTableInput that can be used to create table if it does not exist

Types

type Module

type Module struct {
	Name        string `json:"name" bson:"name" dynamodbav:"name"`
	Description string `json:"description" bson:"description" dynamodbav:"description"`
	Source      string `json:"source_url" bson:"source_url" dynamodbav:"source"`
	Maturity    string `json:"maturity" bson:"maturity" dynamodbav:"maturity"`
	CreatedOn   string `json:"created_on" bson:"created_on" dynamodbav:"created_on"`
	ModifiedOn  string `json:"modified_on" bson:"modified_on" dynamodbav:"modified_on"`
}

type RegistrarService

func (*RegistrarService) GetModule

GetModule Retrieve module metadata

func (*RegistrarService) ListModules

ListModules Retrieve all published modules

func (*RegistrarService) Register

Register new Module in Terrarium

func (*RegistrarService) RegisterWithServer

func (s *RegistrarService) RegisterWithServer(grpcServer grpc.ServiceRegistrar) error

Registers RegistrarService with grpc server

Jump to

Keyboard shortcuts

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