Documentation ¶
Index ¶
Constants ¶
View Source
const ( DefaultTagTableName = "terrarium-module-tags" DefaultTagManagerEndpoint = "tag_manager:3001" )
Variables ¶
View Source
var ( TagTableName = DefaultTagTableName TagManagerEndpoint = DefaultTagManagerEndpoint TagPublished = &terrarium.Response{Message: "Tag published."} ModuleTagTableInitializationError = status.Error(codes.Unknown, "Failed to initialize table for tags.") MarshalModuleTagError = status.Error(codes.Unknown, "Failed to marshal module tags for Dynamodb.") PublishModuleTagError = status.Error(codes.Unknown, "Failed to publish module tag.") UpdateModuleTagError = status.Error(codes.Unknown, "Failed to update module tag.") ConnectToTagManagerError = status.Error(codes.Unknown, "Failed to connect to TagManager service.") )
Functions ¶
func GetTagsSchema ¶
func GetTagsSchema(table string) *dynamodb.CreateTableInput
GetTagsSchema returns CreateTableInput that can be used to create table if it does not exist
func NewTagManagerGrpcClient ¶ added in v0.0.70
func NewTagManagerGrpcClient(endpoint string) services.TagManagerClient
Types ¶
type ModuleTag ¶
type ModuleTag struct { Name string `json:"name" bson:"name" dynamodbav:"name"` Tags []string `json:"tags" bson:"tags" dynamodbav:"tags"` CreatedOn string `json:"created_on" bson:"created_on" dynamodbav:"created_on"` ModifiedOn string `json:"modified_on" bson:"modified_on" dynamodbav:"modified_on"` }
type TagManagerService ¶
type TagManagerService struct { services.UnimplementedTagManagerServer Db storage.DynamoDBTableCreator Table string Schema *dynamodb.CreateTableInput }
func (*TagManagerService) PublishTag ¶
func (s *TagManagerService) PublishTag(ctx context.Context, request *terrarium.PublishTagRequest) (*terrarium.Response, error)
func (*TagManagerService) RegisterWithServer ¶
func (s *TagManagerService) RegisterWithServer(grpcServer grpc.ServiceRegistrar) error
RegisterWithServer registers TagManagerService with grpc server
Click to show internal directories.
Click to hide internal directories.