Documentation
¶
Index ¶
- Constants
- type Connector
- func (pc *Connector) AuthenticateUser(provider string, username string, password string) (authenticated bool, err error)
- func (pc *Connector) CreateDb(name string) (err error)
- func (pc *Connector) CreateTables() (err error)
- func (pc *Connector) CreateUser(provider string, username string, password string, role string, ...) (err error)
- func (pc *Connector) DeleteTable(tableName string) (err error)
- func (pc *Connector) DeleteTables() (err error)
- func (pc *Connector) DeleteUser(provider string, username string) (err error)
- func (pc *Connector) DeleteUsers() (err error)
- func (pc *Connector) GetUser(provider string, username string) (user *User, err error)
- func (pc *Connector) GetUserKey(provider string, username string) (key string)
- func (pc *Connector) GetUsers() (userMap map[string]*User, err error)
- func (pc *Connector) IsValidUser(provider string, username string) (valid bool, err error)
- func (pc *Connector) UpdateUser(provider string, username string, password string, role string, ...) (err error)
- type User
Constants ¶
View Source
const ( DbHost = "meep-postgis.default.svc.cluster.local" DbPort = "5432" DbUser = "" DbPassword = "" DbDefault = "postgres" DbMaxRetryCount int = 2 )
DB Config
View Source
const ( RoleUser = "user" RoleAdmin = "admin" )
View Source
const (
ProviderLocal = "local"
)
View Source
const (
UsersTable = "users"
)
DB Table Names
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connector ¶
type Connector struct {
// contains filtered or unexported fields
}
Connector - Implements a Postgis SQL DB connector
func NewConnector ¶
NewConnector - Creates and initializes a Postgis connector
func (*Connector) AuthenticateUser ¶
func (pc *Connector) AuthenticateUser(provider string, username string, password string) (authenticated bool, err error)
AuthenticateUser - returns true or false if credentials are OK
func (*Connector) CreateTables ¶
func (*Connector) CreateUser ¶
func (pc *Connector) CreateUser(provider string, username string, password string, role string, sboxname string) (err error)
CreateUser - Create new user
func (*Connector) DeleteTable ¶
DeleteTable - Delete table with provided name
func (*Connector) DeleteTables ¶
DeleteTables - Delete all tables
func (*Connector) DeleteUser ¶
DeleteUser - Delete user entry
func (*Connector) DeleteUsers ¶
DeleteAllUsers - Delete all users entries
func (*Connector) GetUserKey ¶
GetUserKey - Get provider-specific user key
func (*Connector) IsValidUser ¶
IsValidUser - does if user exists
Click to show internal directories.
Click to hide internal directories.