Documentation ¶
Index ¶
- Constants
- Variables
- func GetDependenciesSchema(table string) *dynamodb.CreateTableInput
- func NewDependencyManagerGrpcClient(endpoint string) services.DependencyManagerClient
- type ContainerDependencies
- type DependencyManagerService
- func (s *DependencyManagerService) GetContainerDependencies(ctx context.Context, module *terrarium.Module) (map[string]*terrarium.ContainerImageDetails, error)
- func (s *DependencyManagerService) GetModuleDependencies(ctx context.Context, module *terrarium.Module) ([]*terrarium.Module, error)
- func (s *DependencyManagerService) GetModuleKey(module *terrarium.Module) (map[string]types.AttributeValue, error)
- func (s *DependencyManagerService) RegisterContainerDependencies(ctx context.Context, request *terrarium.RegisterContainerDependenciesRequest) (*terrarium.Response, error)
- func (s *DependencyManagerService) RegisterModuleDependencies(ctx context.Context, request *terrarium.RegisterModuleDependenciesRequest) (*terrarium.Response, error)
- func (s *DependencyManagerService) RegisterWithServer(grpcServer grpc.ServiceRegistrar) error
- func (s *DependencyManagerService) RetrieveContainerDependencies(request *terrarium.RetrieveContainerDependenciesRequestV2, ...) error
- func (s *DependencyManagerService) RetrieveModuleDependencies(request *terrarium.RetrieveModuleDependenciesRequest, ...) error
- type ModuleDependencies
Constants ¶
View Source
const ( DefaultModuleDependenciesTableName = "terrarium-module-dependencies" DefaultContainerDependenciesTableName = "terrarium-container-dependencies" DefaultDependencyManagerEndpoint = "dependency_manager:3001" )
Variables ¶
View Source
var ( ModuleDependenciesTableName = DefaultModuleDependenciesTableName ContainerDependenciesTableName = DefaultContainerDependenciesTableName DependencyManagerEndpoint = DefaultDependencyManagerEndpoint ModuleDependenciesRegistered = &terrarium.Response{Message: "Module dependencies successfully registered."} ContainerDependenciesRegistered = &terrarium.Response{Message: "Container dependencies successfully registered."} ModuleDependenciesTableInitializationError = status.Error(codes.Unavailable, "Failed to initialize table for module dependencies.") ContainerDependenciesTableInitializationError = status.Error(codes.Unavailable, "Failed to initialize table for container dependencies.") RegisterDependenciesError = status.Error(codes.Unknown, "Failed to register dependencies.") MarshalDependenciesError = status.Error(codes.Unknown, "Failed to marshal dependencies.") SendModuleDependenciesError = status.Error(codes.Unknown, "Failed to send module dependencies.") SendContainerDependenciesError = status.Error(codes.Unknown, "Failed to send container dependencies.") UnmarshalModuleDependenciesError = status.Error(codes.Unknown, "Failed to unmarshal module dependencies.") UnmarshalContainerDependenciesError = status.Error(codes.Unknown, "Failed to unmarshal container dependencies.") GetModuleDependenciesError = status.Error(codes.Unknown, "Failed to get module dependencies.") GetContainerDependenciesError = status.Error(codes.Unknown, "Failed to get container dependencies.") )
Functions ¶
func GetDependenciesSchema ¶
func GetDependenciesSchema(table string) *dynamodb.CreateTableInput
GetDependenciesSchema returns CreateTableInput that can be used to create table if it does not exist
func NewDependencyManagerGrpcClient ¶ added in v0.0.70
func NewDependencyManagerGrpcClient(endpoint string) services.DependencyManagerClient
Types ¶
type ContainerDependencies ¶
type ContainerDependencies struct { Name string `json:"name" bson:"name" dynamodbav:"name"` Version string `json:"version" bson:"version" dynamodbav:"version"` Images map[string]*terrarium.ContainerImageDetails `json:"images" bson:"images" dynamodbav:"images"` }
type DependencyManagerService ¶
type DependencyManagerService struct { services.UnimplementedDependencyManagerServer Db storage.DynamoDBTableCreator ModuleTable string ModuleSchema *dynamodb.CreateTableInput ContainerTable string ContainerSchema *dynamodb.CreateTableInput }
func (*DependencyManagerService) GetContainerDependencies ¶
func (s *DependencyManagerService) GetContainerDependencies(ctx context.Context, module *terrarium.Module) (map[string]*terrarium.ContainerImageDetails, error)
func (*DependencyManagerService) GetModuleDependencies ¶
func (*DependencyManagerService) GetModuleKey ¶
func (s *DependencyManagerService) GetModuleKey(module *terrarium.Module) (map[string]types.AttributeValue, error)
func (*DependencyManagerService) RegisterContainerDependencies ¶
func (s *DependencyManagerService) RegisterContainerDependencies(ctx context.Context, request *terrarium.RegisterContainerDependenciesRequest) (*terrarium.Response, error)
RegisterContainerDependencies Registers Container dependencies in Terrarium
func (*DependencyManagerService) RegisterModuleDependencies ¶
func (s *DependencyManagerService) RegisterModuleDependencies(ctx context.Context, request *terrarium.RegisterModuleDependenciesRequest) (*terrarium.Response, error)
Registers Module dependencies in Terrarium
func (*DependencyManagerService) RegisterWithServer ¶
func (s *DependencyManagerService) RegisterWithServer(grpcServer grpc.ServiceRegistrar) error
RegisterWithServer Registers DependencyManagerService with grpc server
func (*DependencyManagerService) RetrieveContainerDependencies ¶
func (s *DependencyManagerService) RetrieveContainerDependencies(request *terrarium.RetrieveContainerDependenciesRequestV2, server services.DependencyManager_RetrieveContainerDependenciesServer) error
RetrieveContainerDependencies Retrieve Container dependencies from Terrarium
func (*DependencyManagerService) RetrieveModuleDependencies ¶
func (s *DependencyManagerService) RetrieveModuleDependencies(request *terrarium.RetrieveModuleDependenciesRequest, server services.DependencyManager_RetrieveModuleDependenciesServer) error
RetrieveModuleDependencies Retrieve Module dependencies from Terrarium
Click to show internal directories.
Click to hide internal directories.