Documentation
¶
Index ¶
- type AuthUser
- type Image
- type InviteToken
- type InviteTokenDbHandler
- type Port
- type Server
- type ServerPermissions
- type ServersAuthorizationDbHandler
- func (self *ServersAuthorizationDbHandler) AddPermissions(ctx context.Context, username string, serverId string, ...) error
- func (self *ServersAuthorizationDbHandler) GetPermissions(ctx context.Context, username string, serverId string) (models.Permission, error)
- func (self *ServersAuthorizationDbHandler) RemovePermissions(ctx context.Context, username string, serverId string, ...) error
- func (self *ServersAuthorizationDbHandler) RemoveServer(ctx context.Context, serverId string) error
- func (self *ServersAuthorizationDbHandler) RemoveUser(ctx context.Context, username string) error
- func (self *ServersAuthorizationDbHandler) SetPermissions(ctx context.Context, username string, serverId string, ...) error
- type ServersDbHandler
- func (dbh *ServersDbHandler) CreateServer(ctx context.Context, server dbhandler.Server) error
- func (dbh *ServersDbHandler) DeleteServer(ctx context.Context, serverId string) error
- func (dbh *ServersDbHandler) GetServer(ctx context.Context, serverId string) (*dbhandler.Server, error)
- func (dbh *ServersDbHandler) ListServers(ctx context.Context) ([]dbhandler.Server, error)
- func (dbh *ServersDbHandler) UpdateServer(ctx context.Context, serverId string, ...) error
- type UserPassAuthenticationDbHandler
- func (i *UserPassAuthenticationDbHandler) AuthenticateUser(ctx context.Context, username string, password string) (*models.User, error)
- func (i *UserPassAuthenticationDbHandler) CountUsers(ctx context.Context) (uint, error)
- func (i *UserPassAuthenticationDbHandler) CreateUser(ctx context.Context, username string, password string, ...) error
- func (i *UserPassAuthenticationDbHandler) ListUsers(ctx context.Context) ([]models.User, error)
- func (i *UserPassAuthenticationDbHandler) RemoveUser(ctx context.Context, username string) error
- func (i *UserPassAuthenticationDbHandler) SetPermissions(ctx context.Context, username string, permissions models.Permission) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InviteToken ¶
type InviteToken struct {
Email string `bson:"email"`
Token string `bson:"token"`
Permissions models.Permission `bson:"permissions"`
}
type InviteTokenDbHandler ¶
type InviteTokenDbHandler struct {
dbhandler.InviteTokenDbHandler
// contains filtered or unexported fields
}
func NewInviteTokenDbHandler ¶
func NewInviteTokenDbHandler(config models.MongoDBConfig) (*InviteTokenDbHandler, error)
func (*InviteTokenDbHandler) GetInviteToken ¶
func (i *InviteTokenDbHandler) GetInviteToken(ctx context.Context, token string) (*dbhandler.InviteToken, error)
func (*InviteTokenDbHandler) SaveInviteToken ¶
func (i *InviteTokenDbHandler) SaveInviteToken(ctx context.Context, email string, permissions models.Permission) (string, error)
type Port ¶
type Port struct {
PublicPort uint16 `bson:"public_port"`
ContainerPort uint16 `bson:"container_port"`
Protocol models.PortProtocol `bson:"protocol"`
}
type ServerPermissions ¶
type ServerPermissions struct {
Username string `bson:"username"`
ServerId string `bson:"server_id"`
Permissions models.Permission `bson:"permissions"`
}
type ServersAuthorizationDbHandler ¶
type ServersAuthorizationDbHandler struct {
dbhandler.ServersAuthorizationDbHandler
// contains filtered or unexported fields
}
func NewServersAuthorizationHandler ¶
func NewServersAuthorizationHandler(config models.MongoDBConfig) (*ServersAuthorizationDbHandler, error)
func (*ServersAuthorizationDbHandler) AddPermissions ¶
func (self *ServersAuthorizationDbHandler) AddPermissions(ctx context.Context, username string, serverId string, permissions models.Permission) error
func (*ServersAuthorizationDbHandler) GetPermissions ¶
func (self *ServersAuthorizationDbHandler) GetPermissions(ctx context.Context, username string, serverId string) (models.Permission, error)
func (*ServersAuthorizationDbHandler) RemovePermissions ¶
func (self *ServersAuthorizationDbHandler) RemovePermissions(ctx context.Context, username string, serverId string, permissions models.Permission) error
func (*ServersAuthorizationDbHandler) RemoveServer ¶
func (self *ServersAuthorizationDbHandler) RemoveServer(ctx context.Context, serverId string) error
func (*ServersAuthorizationDbHandler) RemoveUser ¶
func (self *ServersAuthorizationDbHandler) RemoveUser(ctx context.Context, username string) error
func (*ServersAuthorizationDbHandler) SetPermissions ¶
func (self *ServersAuthorizationDbHandler) SetPermissions(ctx context.Context, username string, serverId string, permissions models.Permission) error
type ServersDbHandler ¶
type ServersDbHandler struct {
dbhandler.ServersDbHandler
// contains filtered or unexported fields
}
func NewServersDbHandler ¶
func NewServersDbHandler(config models.MongoDBConfig) (*ServersDbHandler, error)
func (*ServersDbHandler) CreateServer ¶
func (*ServersDbHandler) DeleteServer ¶
func (dbh *ServersDbHandler) DeleteServer(ctx context.Context, serverId string) error
func (*ServersDbHandler) ListServers ¶
func (*ServersDbHandler) UpdateServer ¶
func (dbh *ServersDbHandler) UpdateServer(ctx context.Context, serverId string, updateParams dbhandler.ServerUpdateRequest) error
type UserPassAuthenticationDbHandler ¶
type UserPassAuthenticationDbHandler struct {
dbhandler.UserPassAuthanticationDbHandler
// contains filtered or unexported fields
}
func NewUserPassAuthHandler ¶
func NewUserPassAuthHandler(config models.MongoDBConfig) (*UserPassAuthenticationDbHandler, error)
func (*UserPassAuthenticationDbHandler) AuthenticateUser ¶
func (*UserPassAuthenticationDbHandler) CountUsers ¶
func (i *UserPassAuthenticationDbHandler) CountUsers(ctx context.Context) (uint, error)
func (*UserPassAuthenticationDbHandler) CreateUser ¶
func (i *UserPassAuthenticationDbHandler) CreateUser( ctx context.Context, username string, password string, permissions models.Permission, email string, maxOwnedServers uint, ) error
func (*UserPassAuthenticationDbHandler) RemoveUser ¶
func (i *UserPassAuthenticationDbHandler) RemoveUser(ctx context.Context, username string) error
func (*UserPassAuthenticationDbHandler) SetPermissions ¶
func (i *UserPassAuthenticationDbHandler) SetPermissions( ctx context.Context, username string, permissions models.Permission, ) error
Click to show internal directories.
Click to hide internal directories.