Documentation ¶
Index ¶
- type Controller
- func (c *Controller) CreateTestRole(role string, description string) error
- func (c *Controller) CreateTestToken(username string) (string, error)
- func (c *Controller) CreateTestUser(username string, displayname string) error
- func (c *Controller) Destroy(deleteTempDir bool) error
- func (c *Controller) GetPort() int
- func (c *Controller) SetTestUserRoles(username string, roles *[]string) error
- type Params
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
Controller is a KBase auth service controller.
func (*Controller) CreateTestRole ¶
func (c *Controller) CreateTestRole(role string, description string) error
CreateTestRole creates a role in the auth system
func (*Controller) CreateTestToken ¶
func (c *Controller) CreateTestToken(username string) (string, error)
CreateTestToken creates a token for the given user
func (*Controller) CreateTestUser ¶
func (c *Controller) CreateTestUser(username string, displayname string) error
CreateTestUser creates a test user in the auth system
func (*Controller) Destroy ¶
func (c *Controller) Destroy(deleteTempDir bool) error
Destroy destroys the controller. If deleteTempDir is true, all files created by the controller will be removed.
func (*Controller) GetPort ¶
func (c *Controller) GetPort() int
GetPort returns the port on which MongoDB is listening.
func (*Controller) SetTestUserRoles ¶
func (c *Controller) SetTestUserRoles(username string, roles *[]string) error
SetTestUserRoles sets custom roles for a test user and removes all built-in roles.
type Params ¶
type Params struct { // JarsDir is the path to the /lib/jars directory of the JarsDir string // MongoHost is the mongo host. MongoHost string // MongoDatabase is the database to use for auth data. MongoDatabase string // RootTempDir is where temporary files should be placed. RootTempDir string }
Params are Parameters for creating a KBase Auth2 service (https://github.com/kbase/auth2) controller.
Click to show internal directories.
Click to hide internal directories.