release

package
v0.0.80 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	DefaultReleaseTableName       = "terrarium-releases"
	DefaultReleaseServiceEndpoint = "release:3001"
)

Variables

View Source
var (
	ReleaseTableName                = DefaultReleaseTableName
	ReleaseTableInitializationError = status.Error(codes.Unknown, "Failed to initialize table for releases.")
	ReleaseServiceEndpoint          = DefaultReleaseServiceEndpoint

	ReleasePublished = &release.PublishResponse{}

	MarshalReleaseError = status.Error(codes.Unknown, "Failed to marshal publish release.")
	PublishReleaseError = status.Error(codes.Unknown, "Failed to publish release.")
	ReleaseNotFound     = status.Error(codes.NotFound, "Release not found.")

	TimeFormatLayout     = "2006-01-02 15:04:05.999999999 -0700 MST"
	DefaultMaxAgeSeconds = uint64(86400) // 1 day in seconds
)

Functions

func ConvertUint64ToInt64 added in v0.0.64

func ConvertUint64ToInt64(uint64Value uint64) int64

Converts Uint64 to int64

func GetDistinctValues added in v0.0.64

func GetDistinctValues(resp []string) []string

GetDistinctValues is a helper function to filter the response and return only distinct values.

func GetReleaseSchema added in v0.0.60

func GetReleaseSchema(table string) *dynamodb.CreateTableInput

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

func NewBrowseGrpcClient added in v0.0.67

func NewBrowseGrpcClient(endpoint string) releaseSvc.BrowseClient

func NewPublisherGrpcClient added in v0.0.67

func NewPublisherGrpcClient(endpoint string) releaseSvc.PublisherClient

func NotifyWebhook added in v0.0.62

func NotifyWebhook(payload Release) error

Function to send notifications to webhook

Types

type Release added in v0.0.61

type Release struct {
	Type         string          `json:"type" bson:"type" dynamodbav:"type"`
	Organization string          `json:"organization" bson:"organization" dynamodbav:"organization"`
	Name         string          `json:"name" bson:"name" dynamodbav:"name"`
	Version      string          `json:"version" bson:"version" dynamodbav:"version"`
	Description  string          `json:"description" bson:"description" dynamodbav:"description"`
	Links        []*release.Link `json:"links" bson:"links" dynamodbav:"links"`
	CreatedAt    string          `json:"createdAt" bson:"createdAt" dynamodbav:"createdAt"`
}

type ReleaseService

func (*ReleaseService) GetLatestRelease added in v0.0.61

GetLatestRelease retrieves the latest release.

func (*ReleaseService) ListOrganization added in v0.0.64

ListOrganization is used to retrieve all distinct organizations.

func (*ReleaseService) ListReleaseTypes added in v0.0.64

ListReleaseTypes is used to retrieve all distinct release types.

func (*ReleaseService) ListReleases added in v0.0.61

ListReleases retrieves all releases. Only releases that have been published should be reported.

func (*ReleaseService) Publish added in v0.0.61

Publish is used to publish a new release.

func (*ReleaseService) RegisterWithServer

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

RegisterWithServer registers ReleaseService with grpc server

Jump to

Keyboard shortcuts

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