users

package
v0.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 17, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

users models represent and manipulate users within a Galaxy instance Relevant api endpoints are: `/api/users`

Index

Constants

View Source
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) Delete

func (u *User) Delete(ctx context.Context, purge bool) error

Delete the user with the given id

func (*User) GetAPIKey added in v0.2.1

func (u *User) GetAPIKey(ctx context.Context, password string) (string, error)

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 (u *User) GetBasePath() string

func (*User) GetID added in v0.1.4

func (u *User) GetID() blend4go.GalaxyID

func (*User) SetGalaxyInstance

func (u *User) SetGalaxyInstance(g *blend4go.GalaxyInstance)

func (*User) SetID added in v0.1.4

func (u *User) SetID(id blend4go.GalaxyID)

func (*User) SetPassword added in v0.2.1

func (u *User) SetPassword(ctx context.Context, current, new string) error

Set the users password

func (*User) Undelete added in v0.2.1

func (u *User) Undelete(ctx context.Context) error

Undelete the user

func (*User) Update

func (u *User) Update(ctx context.Context) error

Update the user with the state of the model

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL