Documentation ¶
Overview ¶
Package postgres holds an implementation of the datastore.Store.
Index ¶
- type PostgresDB
- func (db *PostgresDB) AddProjectKey(projectID, key string) (*model.Project, error)
- func (db *PostgresDB) AssignProjectUser(pu model.ProjectUser) (*model.ProjectUser, error)
- func (db *PostgresDB) CreateLocale(loc model.Locale) (*model.Locale, error)
- func (db *PostgresDB) CreateProject(project model.Project) (*model.Project, error)
- func (db *PostgresDB) CreateProjectClient(pc model.ProjectClient) (*model.ProjectClient, error)
- func (db *PostgresDB) CreateUser(u model.User) (*model.User, error)
- func (db *PostgresDB) DeleteLocale(projID string, ident string) error
- func (db *PostgresDB) DeleteProject(id string) error
- func (db *PostgresDB) DeleteProjectClient(projectID, clientID string) error
- func (db *PostgresDB) DeleteProjectKey(projectID, key string) (*model.Project, error)
- func (db *PostgresDB) FindOneClient(clientID string) (*model.ProjectClient, error)
- func (db *PostgresDB) GetProject(id string) (*model.Project, error)
- func (db *PostgresDB) GetProjectClient(projectID, clientID string) (*model.ProjectClient, error)
- func (db *PostgresDB) GetProjectClients(projectID string) ([]model.ProjectClient, error)
- func (db *PostgresDB) GetProjectLocaleByIdent(projectID string, ident string) (*model.Locale, error)
- func (db *PostgresDB) GetProjectLocales(projID string, localeIdents ...string) ([]model.Locale, error)
- func (db *PostgresDB) GetProjectUser(projID, userID string) (*model.ProjectUser, error)
- func (db *PostgresDB) GetProjectUsers(projID string) ([]model.ProjectUser, error)
- func (db *PostgresDB) GetUserByEmail(email string) (*model.User, error)
- func (db *PostgresDB) GetUserByID(id string) (*model.User, error)
- func (db *PostgresDB) GetUserProjectRoles(userID string) ([]model.ProjectUser, error)
- func (db *PostgresDB) GetUserProjects(userID string) ([]model.Project, error)
- func (db *PostgresDB) RevokeProjectUser(pu model.ProjectUser) error
- func (db *PostgresDB) UpdateLocalePairs(projID string, localeIdent string, pairs map[string]string) (*model.Locale, error)
- func (db *PostgresDB) UpdateProject(project model.Project) (*model.Project, error)
- func (db *PostgresDB) UpdateProjectClientName(pc model.ProjectClient) (*model.ProjectClient, error)
- func (db *PostgresDB) UpdateProjectClientSecret(pc model.ProjectClient) (*model.ProjectClient, error)
- func (db *PostgresDB) UpdateProjectKey(projectID, oldKey, newKey string) (*model.Project, int, error)
- func (db *PostgresDB) UpdateProjectName(projectID, name string) (*model.Project, error)
- func (db *PostgresDB) UpdateProjectUser(pu model.ProjectUser) (*model.ProjectUser, error)
- func (db *PostgresDB) UpdateUserEmail(u model.User) (*model.User, error)
- func (db *PostgresDB) UpdateUserName(u model.User) (*model.User, error)
- func (db *PostgresDB) UpdateUserPassword(u model.User) (*model.User, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PostgresDB ¶
PostgresDB implements the datastore.Store interface for a Postgres Database.
func (*PostgresDB) AddProjectKey ¶
func (db *PostgresDB) AddProjectKey(projectID, key string) (*model.Project, error)
func (*PostgresDB) AssignProjectUser ¶
func (db *PostgresDB) AssignProjectUser(pu model.ProjectUser) (*model.ProjectUser, error)
func (*PostgresDB) CreateLocale ¶
func (*PostgresDB) CreateProject ¶
func (*PostgresDB) CreateProjectClient ¶
func (db *PostgresDB) CreateProjectClient(pc model.ProjectClient) (*model.ProjectClient, error)
func (*PostgresDB) CreateUser ¶
func (*PostgresDB) DeleteLocale ¶
func (db *PostgresDB) DeleteLocale(projID string, ident string) error
func (*PostgresDB) DeleteProject ¶
func (db *PostgresDB) DeleteProject(id string) error
func (*PostgresDB) DeleteProjectClient ¶
func (db *PostgresDB) DeleteProjectClient(projectID, clientID string) error
func (*PostgresDB) DeleteProjectKey ¶
func (db *PostgresDB) DeleteProjectKey(projectID, key string) (*model.Project, error)
func (*PostgresDB) FindOneClient ¶
func (db *PostgresDB) FindOneClient(clientID string) (*model.ProjectClient, error)
func (*PostgresDB) GetProject ¶
func (db *PostgresDB) GetProject(id string) (*model.Project, error)
func (*PostgresDB) GetProjectClient ¶
func (db *PostgresDB) GetProjectClient(projectID, clientID string) (*model.ProjectClient, error)
func (*PostgresDB) GetProjectClients ¶
func (db *PostgresDB) GetProjectClients(projectID string) ([]model.ProjectClient, error)
func (*PostgresDB) GetProjectLocaleByIdent ¶
func (*PostgresDB) GetProjectLocales ¶
func (*PostgresDB) GetProjectUser ¶
func (db *PostgresDB) GetProjectUser(projID, userID string) (*model.ProjectUser, error)
func (*PostgresDB) GetProjectUsers ¶
func (db *PostgresDB) GetProjectUsers(projID string) ([]model.ProjectUser, error)
func (*PostgresDB) GetUserByEmail ¶
func (db *PostgresDB) GetUserByEmail(email string) (*model.User, error)
func (*PostgresDB) GetUserByID ¶
func (db *PostgresDB) GetUserByID(id string) (*model.User, error)
func (*PostgresDB) GetUserProjectRoles ¶
func (db *PostgresDB) GetUserProjectRoles(userID string) ([]model.ProjectUser, error)
func (*PostgresDB) GetUserProjects ¶
func (db *PostgresDB) GetUserProjects(userID string) ([]model.Project, error)
func (*PostgresDB) RevokeProjectUser ¶
func (db *PostgresDB) RevokeProjectUser(pu model.ProjectUser) error
func (*PostgresDB) UpdateLocalePairs ¶
func (*PostgresDB) UpdateProject ¶
func (*PostgresDB) UpdateProjectClientName ¶
func (db *PostgresDB) UpdateProjectClientName(pc model.ProjectClient) (*model.ProjectClient, error)
func (*PostgresDB) UpdateProjectClientSecret ¶
func (db *PostgresDB) UpdateProjectClientSecret(pc model.ProjectClient) (*model.ProjectClient, error)
func (*PostgresDB) UpdateProjectKey ¶
func (*PostgresDB) UpdateProjectName ¶
func (db *PostgresDB) UpdateProjectName(projectID, name string) (*model.Project, error)
func (*PostgresDB) UpdateProjectUser ¶
func (db *PostgresDB) UpdateProjectUser(pu model.ProjectUser) (*model.ProjectUser, error)
func (*PostgresDB) UpdateUserEmail ¶
func (*PostgresDB) UpdateUserName ¶
func (*PostgresDB) UpdateUserPassword ¶
Click to show internal directories.
Click to hide internal directories.