data

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TagNotFoundError = errors.New("tag not found")

Functions

This section is empty.

Types

type MetadataRepository added in v0.4.0

type MetadataRepository interface {
	GetUnprocessedTagIds(ctx context.Context) ([]string, error)
	GetProtoFilesForTagId(ctx context.Context, tagId string) ([]*v1.ProtoFile, error)
	SaveParsedProtoFiles(ctx context.Context, tagId string, files []*model.ParsedProtoFile) error
	GetParsedProtoFiles(ctx context.Context, tagId string) ([]*model.ParsedProtoFile, error)
	GetTagMetaByTagId(ctx context.Context, tagId string) (*model.TagMeta, error)
}

func NewMetadataRepository added in v0.4.0

func NewMetadataRepository(pool *pgxpool.Pool, logger log.Logger) MetadataRepository

NewMetadataRepository create a new metadata repository with pool

type RegistryRepository

type RegistryRepository interface {
	RegisterModule(ctx context.Context, moduleName string) error
	GetModule(ctx context.Context, name string) (*v1.Module, error)
	ListModules(ctx context.Context, pageSize int, token string) ([]*v1.Module, string, error)
	DeleteModule(ctx context.Context, name string) error
	PushModule(ctx context.Context, name string, tag string, protofiles []*v1.ProtoFile) (*v1.Module, error)
	PushDraftModule(ctx context.Context, name string, tag string, protofiles []*v1.ProtoFile, dependencies []*v1.Dependency) (*v1.Module, error)
	PullModule(ctx context.Context, name string, tag string) (*v1.Module, []*v1.ProtoFile, error)
	PullDraftModule(ctx context.Context, name string, tag string) (*v1.Module, []*v1.ProtoFile, error)
	GetModuleTagId(ctx context.Context, moduleName string, tag string) (string, error)
	DeleteModuleTag(ctx context.Context, name string, tag string) error
	AddModuleDependencies(ctx context.Context, name string, tag string, dependencies []*v1.Dependency) error
	GetModuleDependencies(ctx context.Context, name string, tag string) ([]*v1.Dependency, error)
	DeleteObsoleteDraftTags(ctx context.Context) error
}

func NewRegistryRepository

func NewRegistryRepository(pool *pgxpool.Pool, logger log.Logger) RegistryRepository

Jump to

Keyboard shortcuts

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