Documentation
¶
Index ¶
- Constants
- Variables
- func NameExists(SD *datastore.DataStore, UID user.ID, name string) (bool, error)
- func PersistenceCreate(SD *datastore.DataStore, name string) (string, error)
- type Container
- type Containers
- type ID
- type Model
- func (m Model) ByID(id ID) (*Container, string, int, *storeerr.Errors)
- func (m Model) Create(name string) (string, string, int, *storeerr.Errors)
- func (m Model) Delete(id ID) (ID, string, int, *storeerr.Errors)
- func (m Model) Get() (Containers, string, int, *storeerr.Errors)
- func (m Model) UpdateName(id ID, name string) (string, int, *storeerr.Errors)
- type Name
Constants ¶
View Source
const (
NotFound = "Container not found"
)
Messages
View Source
const Type string = "Container"
Type of model
Variables ¶
View Source
var ErrContainerNotFound = errors.New("container not found")
ErrContainerNotFound is to be returned if container is not found for its ID
Functions ¶
func NameExists ¶
NameExists checks whether container name exists
Types ¶
type Container ¶
type Container struct {
ID ID `json:"_id,omitempty" db:"ID,omitempty"`
UserID user.ID `json:"-" db:"USER_ID,omitempty"`
Name Name `json:"name,omitempty" db:"NAME,omitempty"`
Created time.Time `json:"created,omitempty" db:"CREATED,omitempty"`
Updated time.Time `json:"updated,omitempty" db:"UPDATED,omitempty"`
}
Container represents collection of the objects
Click to show internal directories.
Click to hide internal directories.