Documentation ¶
Index ¶
- Constants
- type Flag
- type FlagError
- type FlagMongoRepository
- func (repository FlagMongoRepository) Delete(name string) error
- func (repository FlagMongoRepository) Exists(name string) (bool, error)
- func (repository FlagMongoRepository) Get(key string) (bool, error)
- func (repository FlagMongoRepository) List() ([]Flag, error)
- func (repository FlagMongoRepository) Set(key string, value interface{}) error
- type FlagRepository
- type FlagService
- func (flagService FlagService) Create(f Flag) error
- func (flagService FlagService) Delete(name string) error
- func (flagService FlagService) Exists(key string) (bool, error)
- func (flagService FlagService) Get(key string) (bool, error)
- func (flagService FlagService) List() ([]Flag, error)
- func (flagService FlagService) Update(name string, value bool) error
Constants ¶
View Source
const DEFAULT_EXPIRATION_TIME = 5 * time.Minute
View Source
const ErrFlagAlreadyExists = FlagError("toggles: Flag already exists") // nolint:errname
View Source
const ErrFlagNotFound = FlagError("toggles: Flag not found") // nolint:errname
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FlagMongoRepository ¶
type FlagMongoRepository struct {
// contains filtered or unexported fields
}
func (FlagMongoRepository) Delete ¶
func (repository FlagMongoRepository) Delete(name string) error
func (FlagMongoRepository) Exists ¶
func (repository FlagMongoRepository) Exists(name string) (bool, error)
func (FlagMongoRepository) Get ¶
func (repository FlagMongoRepository) Get(key string) (bool, error)
func (FlagMongoRepository) List ¶
func (repository FlagMongoRepository) List() ([]Flag, error)
func (FlagMongoRepository) Set ¶
func (repository FlagMongoRepository) Set(key string, value interface{}) error
type FlagRepository ¶
type FlagRepository interface { Get(key string) (bool, error) Exists(name string) (bool, error) Set(key string, value interface{}) error List() ([]Flag, error) Delete(name string) error }
func NewFlagMongoRepository ¶
func NewFlagMongoRepository(host string, port int) (FlagRepository, error)
type FlagService ¶
type FlagService struct {
// contains filtered or unexported fields
}
func NewFlagService ¶
func NewFlagService(cacheClient storage.CacheClient, repository FlagRepository) FlagService
func (FlagService) Create ¶
func (flagService FlagService) Create(f Flag) error
func (FlagService) Delete ¶
func (flagService FlagService) Delete(name string) error
func (FlagService) List ¶
func (flagService FlagService) List() ([]Flag, error)
Click to show internal directories.
Click to hide internal directories.