configuration

package
v0.0.0-...-d23ef4a Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2018 License: MIT Imports: 12 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repository

type Repository interface {
	io.Closer
	InsertConfig(config *models.Config) error
	FindConfigByKey(key string) (models.Config, error)
	FindAll(page uint32, size uint32, sorts []repositories.Sort) ([]models.Config, error)
	CountAll() (int64, error)
	DeleteConfigByKey(key string) (models.Config, error)
	DeleteAll() error
	UpdateConfigByKey(key string, fields map[string]interface{}) (config models.Config, err error)
}

Repository handles the basic operations of a account entity/model. It's an interface in order to be testable, i.e a memory account repository or a connected to an sql database.

func NewConfigurationRepository

func NewConfigurationRepository() Repository

NewConfigurationRepository returns a new account memory-based repository, the one and only repository type in our example.

Jump to

Keyboard shortcuts

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