postgres

package
v0.0.0-...-9b87864 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2021 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

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

func (*InviteService) Invites

func (service *InviteService) Invites() ([]shared.Invite, error)

Invites searches for all invites

func (*InviteService) IsValid

func (service *InviteService) IsValid(token string) (bool, error)

IsValid searches for a single invite with a specific token

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

Jump to

Keyboard shortcuts

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