Documentation ¶
Index ¶
- type ElementService
- func (service *ElementService) Close()
- func (service *ElementService) CreateOrReplace(element *shared.Element) error
- func (service *ElementService) Delete(namespace, key string) error
- func (service *ElementService) DeleteInNamespace(namespace string) error
- func (service *ElementService) Element(sourceNamespace, sourceKey string) (*shared.Element, error)
- func (service *ElementService) Elements() ([]*shared.Element, error)
- func (service *ElementService) ElementsInNamespace(namespace string) ([]*shared.Element, error)
- func (service *ElementService) InitializeTable() error
- type InviteService
- func (service *InviteService) Close()
- func (service *InviteService) Create(invite shared.Invite) error
- func (service *InviteService) Delete(token string) error
- func (service *InviteService) InitializeTable() error
- func (service *InviteService) Invites() ([]shared.Invite, error)
- func (service *InviteService) IsValid(token string) (bool, error)
- type NamespaceService
- func (service *NamespaceService) Close()
- func (service *NamespaceService) CreateOrReplace(namespace *shared.Namespace) error
- func (service *NamespaceService) Delete(id string) error
- func (service *NamespaceService) InitializeTable() error
- func (service *NamespaceService) Namespace(sourceID string) (*shared.Namespace, error)
- func (service *NamespaceService) Namespaces() ([]*shared.Namespace, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ElementService ¶
type ElementService struct {
// contains filtered or unexported fields
}
ElementService represents the postgres element service
func NewElementService ¶
func NewElementService(dsn string) (*ElementService, error)
NewElementService creates a new postgres element service
func (*ElementService) Close ¶
func (service *ElementService) Close()
Close closes the postgres element service
func (*ElementService) CreateOrReplace ¶
func (service *ElementService) CreateOrReplace(element *shared.Element) error
CreateOrReplace creates or replaces an element
func (*ElementService) Delete ¶
func (service *ElementService) Delete(namespace, key string) error
Delete deletes an element
func (*ElementService) DeleteInNamespace ¶
func (service *ElementService) DeleteInNamespace(namespace string) error
DeleteInNamespace deletes every element in a namespace
func (*ElementService) Element ¶
func (service *ElementService) Element(sourceNamespace, sourceKey string) (*shared.Element, error)
Element searches for a single element with a specific key in a specific namespace
func (*ElementService) Elements ¶
func (service *ElementService) Elements() ([]*shared.Element, error)
Elements searches for all elements
func (*ElementService) ElementsInNamespace ¶
func (service *ElementService) ElementsInNamespace(namespace string) ([]*shared.Element, error)
ElementsInNamespace searches for all elements in a specific namespace
func (*ElementService) InitializeTable ¶
func (service *ElementService) InitializeTable() error
InitializeTable initializes the element table
type InviteService ¶
type InviteService struct {
// contains filtered or unexported fields
}
InviteService represents the postgres invite service
func NewInviteService ¶
func NewInviteService(dsn string) (*InviteService, error)
NewInviteService creates a new postgres invite service
func (*InviteService) Close ¶
func (service *InviteService) Close()
Close closes the postgres invite service
func (*InviteService) Create ¶
func (service *InviteService) Create(invite shared.Invite) error
Create creates an invite
func (*InviteService) Delete ¶
func (service *InviteService) Delete(token string) error
Delete deletes an invite
func (*InviteService) InitializeTable ¶
func (service *InviteService) InitializeTable() error
InitializeTable initializes the invite table
type NamespaceService ¶
type NamespaceService struct {
// contains filtered or unexported fields
}
NamespaceService represents the postgres namespace service
func NewNamespaceService ¶
func NewNamespaceService(dsn string) (*NamespaceService, error)
NewNamespaceService creates a new postgres namespace service
func (*NamespaceService) Close ¶
func (service *NamespaceService) Close()
Close closes the postgres namespace service
func (*NamespaceService) CreateOrReplace ¶
func (service *NamespaceService) CreateOrReplace(namespace *shared.Namespace) error
CreateOrReplace creates or replaces a namespace
func (*NamespaceService) Delete ¶
func (service *NamespaceService) Delete(id string) error
Delete deletes a namespace
func (*NamespaceService) InitializeTable ¶
func (service *NamespaceService) InitializeTable() error
InitializeTable initializes the namespace table
func (*NamespaceService) Namespace ¶
func (service *NamespaceService) Namespace(sourceID string) (*shared.Namespace, error)
Namespace searches for a namespace by its ID
func (*NamespaceService) Namespaces ¶
func (service *NamespaceService) Namespaces() ([]*shared.Namespace, error)
Namespaces searches for all existent namespaces