metadata

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2022 License: Apache-2.0 Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CacheStore added in v0.0.4

type CacheStore interface {
	ListCachedFeature(ctx context.Context, opt ListCachedFeatureOpt) types.FeatureList
	GetCachedGroup(ctx context.Context, id int) (*types.Group, error)

	// Refresh pulls data from database and update cache.
	Refresh() error
}

CacheStore defines methods that a memory backend store must implement.

type CreateEntityOpt added in v0.0.2

type CreateEntityOpt struct {
	types.CreateEntityOpt
}

Create

type CreateFeatureOpt

type CreateFeatureOpt struct {
	FeatureName string
	GroupID     int
	Description string
	ValueType   types.ValueType
}

type CreateGroupOpt added in v0.0.3

type CreateGroupOpt struct {
	GroupName   string
	EntityID    int
	Description string
	Category    types.Category

	SnapshotInterval int
}

type CreateRevisionOpt

type CreateRevisionOpt struct {
	Revision      int64
	GroupID       int
	SnapshotTable *string
	CdcTable      *string
	Anchored      bool
	Description   string
}

type DBStore added in v0.0.4

type DBStore interface {
	// entity
	CreateEntity(ctx context.Context, opt CreateEntityOpt) (int, error)
	UpdateEntity(ctx context.Context, opt UpdateEntityOpt) error
	GetEntity(ctx context.Context, id int) (*types.Entity, error)
	GetEntityByName(ctx context.Context, name string) (*types.Entity, error)
	ListEntity(ctx context.Context, entityIDs *[]int) (types.EntityList, error)

	// feature
	CreateFeature(ctx context.Context, opt CreateFeatureOpt) (int, error)
	UpdateFeature(ctx context.Context, opt UpdateFeatureOpt) error
	GetFeature(ctx context.Context, id int) (*types.Feature, error)
	GetFeatureByName(ctx context.Context, groupName string, featureName string) (*types.Feature, error)
	ListFeature(ctx context.Context, opt ListFeatureOpt) (types.FeatureList, error)

	// feature group
	CreateGroup(ctx context.Context, opt CreateGroupOpt) (int, error)
	UpdateGroup(ctx context.Context, opt UpdateGroupOpt) error
	GetGroup(ctx context.Context, id int) (*types.Group, error)
	GetGroupByName(ctx context.Context, name string) (*types.Group, error)
	ListGroup(ctx context.Context, opt ListGroupOpt) (types.GroupList, error)

	// revision
	CreateRevision(ctx context.Context, opt CreateRevisionOpt) (int, error)
	UpdateRevision(ctx context.Context, opt UpdateRevisionOpt) error
	GetRevision(ctx context.Context, id int) (*types.Revision, error)
	GetRevisionBy(ctx context.Context, groupID int, revision int64) (*types.Revision, error)
	ListRevision(ctx context.Context, groupID *int) (types.RevisionList, error)

	// transaction
	WithTransaction(ctx context.Context, fn func(context.Context, DBStore) error) error
}

DBStore defines the methods that a database backend store must implement.

type ListCachedFeatureOpt added in v0.1.0

type ListCachedFeatureOpt struct {
	FullNames *[]string
	GroupName *string
	GroupID   *int
}

type ListFeatureOpt added in v0.0.2

type ListFeatureOpt struct {
	EntityIDs  *[]int
	GroupIDs   *[]int
	FeatureIDs *[]int
}

type ListGroupOpt added in v0.1.0

type ListGroupOpt struct {
	EntityIDs *[]int
	GroupIDs  *[]int
}

type SqlxContext added in v0.0.2

type SqlxContext interface {
	GetContext(ctx context.Context, dest interface{}, query string, args ...interface{}) error
	SelectContext(ctx context.Context, dest interface{}, query string, args ...interface{}) error
	ExecContext(ctx context.Context, query string, args ...interface{}) (sql.Result, error)

	DriverName() string
	Rebind(string) string
}

type Store

type Store interface {
	DBStore
	CacheStore

	Ping(ctx context.Context) error
	io.Closer
}

type UpdateEntityOpt added in v0.0.2

type UpdateEntityOpt struct {
	EntityID       int
	NewDescription *string
}

Update

type UpdateFeatureOpt added in v0.0.2

type UpdateFeatureOpt struct {
	FeatureID      int
	NewDescription *string
}

type UpdateGroupOpt added in v0.0.3

type UpdateGroupOpt struct {
	GroupID             int
	NewSnapshotInterval *int
	NewDescription      *string
	NewOnlineRevisionID *int
}

type UpdateRevisionOpt added in v0.0.2

type UpdateRevisionOpt struct {
	RevisionID       int
	NewRevision      *int64
	NewAnchored      *bool
	NewSnapshotTable *string
	NewCdcTable      *string
}

Directories

Path Synopsis
Package mock_metadata is a generated GoMock package.
Package mock_metadata is a generated GoMock package.

Jump to

Keyboard shortcuts

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