Documentation ¶
Overview ¶
Package postgres provides the postgres based DataStore implementation
Index ¶
- type NonceStore
- type Store
- func (s *Store) CreateUser(user datastore.User) (int64, error)
- func (s Store) GetSettings() ([]models.Setting, error)
- func (s *Store) GetUser(username string) (datastore.User, error)
- func (s *Store) OpenIDNonceStore() openid.NonceStore
- func (s *Store) OrgUserAccess(orgID, username string, role int) bool
- func (s *Store) OrganizationCreate(org datastore.Organization) error
- func (s *Store) OrganizationForUserToggle(orgID, username string) error
- func (s *Store) OrganizationGet(orgID string) (datastore.Organization, error)
- func (s *Store) OrganizationUpdate(org datastore.Organization) error
- func (s *Store) OrganizationsForUser(username string) ([]datastore.Organization, error)
- func (s Store) Set(key string, value string) error
- func (s *Store) UserDelete(username string) error
- func (s *Store) UserList() ([]datastore.User, error)
- func (s *Store) UserUpdate(user datastore.User) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NonceStore ¶
type NonceStore struct {
DB *Store
}
NonceStore is a nonce store backed by database
func (*NonceStore) Accept ¶
func (s *NonceStore) Accept(endpoint, nonce string) error
Accept implements openid.NonceStore.Accept
type Store ¶
Store implements an in-memory store for testing
func (*Store) CreateUser ¶
CreateUser creates a new user
func (Store) GetSettings ¶
GetSettings gets an array of models.Setting or an error
func (*Store) OpenIDNonceStore ¶
func (s *Store) OpenIDNonceStore() openid.NonceStore
OpenIDNonceStore returns an openid nonce store
func (*Store) OrgUserAccess ¶
OrgUserAccess checks if the user has permissions to access the organization
func (*Store) OrganizationCreate ¶
func (s *Store) OrganizationCreate(org datastore.Organization) error
OrganizationCreate creates a new organization
func (*Store) OrganizationForUserToggle ¶
OrganizationForUserToggle toggles the user access to an organization
func (*Store) OrganizationGet ¶
func (s *Store) OrganizationGet(orgID string) (datastore.Organization, error)
OrganizationGet returns an organization
func (*Store) OrganizationUpdate ¶
func (s *Store) OrganizationUpdate(org datastore.Organization) error
OrganizationUpdate updates an organization
func (*Store) OrganizationsForUser ¶
func (s *Store) OrganizationsForUser(username string) ([]datastore.Organization, error)
OrganizationsForUser returns the organizations a user can access
func (*Store) UserDelete ¶
UserDelete removes a user