users

package
v0.6.9 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2023 License: MPL-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiToken added in v0.5.15

type ApiToken struct {
	Token string `json:"token"`
}

type CreateApiTokenOpts added in v0.5.15

type CreateApiTokenOpts struct {
	Email            string `json:"email" required:"true"`
	Password         string `json:"password" required:"true"`
	TokenName        string `json:"token_name" required:"true"`
	TokenDescription string `json:"token_description" required:"true"`
}

CreateApiTokenOpts represents options used to create an api token.

func (CreateApiTokenOpts) ToApiTokenCreateMap added in v0.5.15

func (opts CreateApiTokenOpts) ToApiTokenCreateMap() (map[string]interface{}, error)

ToApiTokenCreateMap builds a request body from CreateApiTokenOpts.

type CreateApiTokenOptsBuilder added in v0.5.15

type CreateApiTokenOptsBuilder interface {
	ToApiTokenCreateMap() (map[string]interface{}, error)
}

CreateApiTokenOptsBuilder allows extensions to add additional parameters to the CreateApiToken request.

type CreateApiTokenResult added in v0.5.15

type CreateApiTokenResult struct {
	// contains filtered or unexported fields
}

CreateApiTokenResult represents the result of a create operation. Call its Extract method to interpret it as an api token.

func CreateApiToken added in v0.5.15

CreateApiToken accepts a CreateApiTokenOpts struct and creates a new api token using the values provided.

func (CreateApiTokenResult) Extract added in v0.5.15

func (r CreateApiTokenResult) Extract() (*ApiToken, error)

Extract is a function that accepts a result and extracts an api token resource.

func (CreateApiTokenResult) ExtractInto added in v0.5.15

func (r CreateApiTokenResult) ExtractInto(v interface{}) error

type CreateUserOpts added in v0.5.15

type CreateUserOpts struct {
	Email    string `json:"email" required:"true"`
	Password string `json:"password" required:"true"`
}

CreateUserOpts represents options used to create an user.

func (CreateUserOpts) ToUserCreateMap added in v0.5.15

func (opts CreateUserOpts) ToUserCreateMap() (map[string]interface{}, error)

ToUserCreateMap builds a request body from CreateUserOpts.

type CreateUserOptsBuilder added in v0.5.15

type CreateUserOptsBuilder interface {
	ToUserCreateMap() (map[string]interface{}, error)
}

CreateUserOptsBuilder allows extensions to add additional parameters to the Create request.

type CreateUserResult added in v0.5.15

type CreateUserResult struct {
	// contains filtered or unexported fields
}

CreateUserResult represents the result of a create operation. Call its Extract method to interpret it as a user.

func CreateUser added in v0.5.15

CreateUser accepts a CreateUserOpts struct and creates a new user using the values provided.

func (CreateUserResult) Extract added in v0.5.15

func (r CreateUserResult) Extract() (*User, error)

Extract is a function that accepts a result and extracts a user resource.

func (CreateUserResult) ExtractInto added in v0.5.15

func (r CreateUserResult) ExtractInto(v interface{}) error

type User

type User struct {
	UserID int `json:"user_id"`
}

type UserAssignment added in v0.5.16

type UserAssignment struct {
	ClientID  *int   `json:"client_id"`
	ID        int    `json:"id"`
	ProjectID *int   `json:"project_id"`
	UserID    int    `json:"user_id"`
	Role      string `json:"role"`
}

type UserAssignmentOpts added in v0.5.16

type UserAssignmentOpts struct {
	ClientID  *int   `json:"client_id"`
	ProjectID *int   `json:"project_id"`
	UserID    int    `json:"user_id" required:"true"`
	Role      string `json:"role" required:"true"`
}

UserAssignmentOpts represents options used to assign role to user.

func (UserAssignmentOpts) ToUserAssignmentMap added in v0.5.16

func (opts UserAssignmentOpts) ToUserAssignmentMap() (map[string]interface{}, error)

ToUserAssignmentMap builds a request body from UserAssignmentOpts.

type UserAssignmentOptsBuilder added in v0.5.16

type UserAssignmentOptsBuilder interface {
	ToUserAssignmentMap() (map[string]interface{}, error)
}

UserAssignmentOptsBuilder allows extensions to add additional parameters to the user assignment request.

type UserAssignmentResult added in v0.5.16

type UserAssignmentResult struct {
	// contains filtered or unexported fields
}

UserAssignmentResult represents the result of a user assignment operation. Call its Extract method to interpret it as a user assignments.

func AssignUser added in v0.5.16

AssignUser accepts a UserAssignmentOpts struct and assigns role to user using the values provided.

func (UserAssignmentResult) Extract added in v0.5.16

func (r UserAssignmentResult) Extract() (*UserAssignment, error)

Extract is a function that accepts a result and extracts a user assignments resource.

func (UserAssignmentResult) ExtractInto added in v0.5.16

func (r UserAssignmentResult) ExtractInto(v interface{}) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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