Documentation ¶
Overview ¶
users models represent and manipulate users within a Galaxy instance Relevant api endpoints are: `/api/users`
Index ¶
- Constants
- type User
- func (u *User) Delete(ctx context.Context, purge bool) error
- func (u *User) GetAPIKey(ctx context.Context, password string) (string, error)
- func (u *User) GetBasePath() string
- func (u *User) GetID() blend4go.GalaxyID
- func (u *User) SetGalaxyInstance(g *blend4go.GalaxyInstance)
- func (u *User) SetID(id blend4go.GalaxyID)
- func (u *User) SetPassword(ctx context.Context, current, new string) error
- func (u *User) Undelete(ctx context.Context) error
- func (u *User) Update(ctx context.Context) error
Constants ¶
const BasePath = "/api/users"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type User ¶
type User struct { Id blend4go.GalaxyID `json:"id,omitempty"` Username string `json:"username,omitempty"` QuotaPercent uint `json:"quota_percent,omitempty"` //Preferences ? `json:"preferences,omitempty"` TotalDiskUsage float32 `json:"total_disk_usage,omitempty"` Deleted bool `json:"deleted,omitempty"` Purged bool `json:"purged,omitempty"` NiceTotalDiskUsage string `json:"nice_total_disk_usage,omitempty"` Quota string `json:"quota,omitempty"` Email string `json:"email,omitempty"` IsAdmin bool `json:"is_admin,omitempty"` TagsUsed []string `json:"tags_used,omitempty"` // contains filtered or unexported fields }
func Get ¶
func Get(ctx context.Context, g *blend4go.GalaxyInstance, id blend4go.GalaxyID, deleted bool) (*User, error)
Displays information about a user.
func List ¶
func List(ctx context.Context, g *blend4go.GalaxyInstance, deleted bool, filterEmail, filterName, filterAny string) ([]*User, error)
Displays a collection (list) of users. deleted - If true, show deleted users filterEmail - (optional) An email address to filter on. (Non-admin users can only use this if expose_user_email is True in galaxy.ini) filterName - (optional) A username to filter on. (Non-admin users can only use this if expose_user_name is True in galaxy.ini) filterAny - (optional) Filter on username OR email. (Non-admin users can use this, the email filter and username filter will only be active if their corresponding expose_user_* is True in galaxy.ini)
func NewUser ¶
func NewUser(ctx context.Context, g *blend4go.GalaxyInstance, username, password, email string) (*User, error)
Creates a new Galaxy user.
func (*User) GetAPIKey ¶ added in v0.2.1
returns an API key for authenticated user password is optional if password == "" the user associated with the Galaxy connection must be an admin
func (*User) GetBasePath ¶
func (*User) SetGalaxyInstance ¶
func (u *User) SetGalaxyInstance(g *blend4go.GalaxyInstance)
func (*User) SetPassword ¶ added in v0.2.1
Set the users password