Documentation ¶
Overview ¶
Package user contains all code related to the user domain.
Index ¶
- type Backend
- type Driver
- func (d Driver) Append(u User) error
- func (d Driver) Apply(u User) (updated bool, err error)
- func (d Driver) Create(u User) error
- func (d Driver) Delete(id string) error
- func (d Driver) Get(id string) (User, error)
- func (d Driver) List() (List, error)
- func (d Driver) Remove(u User) error
- func (d Driver) Update(u User) error
- func (d Driver) Upsert(u User) (updated bool, err error)
- type List
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend interface { ListUsers() (List, error) GetUser(id string) (User, error) CreateUser(User) error UpdateUser(User) error AppendUser(User) error RemoveUser(User) error DeleteUser(id string) error }
Backend interface.
type Driver ¶
type Driver struct {
// contains filtered or unexported fields
}
Driver is the entry point of the domain that expose methods.
type List ¶
type List interface { All() []User Index(idx uint) User Len() uint String() string MarshalJSON() ([]byte, error) MarshalYAML() (interface{}, error) }
List of user objects.
Click to show internal directories.
Click to hide internal directories.