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 CreateFeatureOpt ¶
type CreateGroupOpt ¶ added in v0.0.3
type CreateRevisionOpt ¶
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 ListFeatureOpt ¶ added in v0.0.2
type ListGroupOpt ¶ added in v0.1.0
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 UpdateEntityOpt ¶ added in v0.0.2
Update
type UpdateFeatureOpt ¶ added in v0.0.2
type UpdateGroupOpt ¶ added in v0.0.3
Click to show internal directories.
Click to hide internal directories.