users

package
v0.6.28 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2024 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

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

type CreateApiTokenOpts

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

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

ToApiTokenCreateMap builds a request body from CreateApiTokenOpts.

type CreateApiTokenOptsBuilder

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

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

type CreateApiTokenResult

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

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

func (CreateApiTokenResult) Extract

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

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

func (CreateApiTokenResult) ExtractInto

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

type CreateUserOpts

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

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

ToUserCreateMap builds a request body from CreateUserOpts.

type CreateUserOptsBuilder

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

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

type CreateUserResult

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

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

func (CreateUserResult) Extract

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

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

func (CreateUserResult) ExtractInto

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

type User

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

type UserAssignment

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

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

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

ToUserAssignmentMap builds a request body from UserAssignmentOpts.

type UserAssignmentOptsBuilder

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

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

type UserAssignmentResult

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

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

func (UserAssignmentResult) Extract

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

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

func (UserAssignmentResult) ExtractInto

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