client

package
v0.0.0-...-16952c6 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2024 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func New

func New(idStr, apiSecretStr, apiUrl, apiVersion string, c *http.Client) (*Client, error)

func (*Client) AuthOK

func (client *Client) AuthOK() error

func (*Client) CreateOrg

func (client *Client) CreateOrg(
	name, ownerDisplayName, ownerEmail safe.VarChar,
	ownerPassword safe.Password,
	role models.Role,
) (*org.Org, error)

func (*Client) CreateUser

func (client *Client) CreateUser(
	displayName safe.VarChar,
	email safe.VarChar,
	org models.ID,
	password safe.Password,
) (*user.User, error)

func (*Client) DeleteOrg

func (client *Client) DeleteOrg(id models.ID) error

func (*Client) OK

func (client *Client) OK() error

func (*Client) ReadOrg

func (client *Client) ReadOrg(id models.ID) (*org.Org, error)

func (*Client) ReadOrgUsers

func (client *Client) ReadOrgUsers(id models.ID) ([]models.ID, error)

func (*Client) ReadUser

func (client *Client) ReadUser(id models.ID) (*user.User, error)

func (*Client) RefreshToken

func (client *Client) RefreshToken() error

func (*Client) UpdateOrgOwner

func (client *Client) UpdateOrgOwner(id models.ID, owner models.ID) (*org.Org, error)

func (*Client) UpdateOrgStatus

func (client *Client) UpdateOrgStatus(id models.ID, status models.Status) (*org.Org, error)

func (*Client) UpdateUserAPISecret

func (client *Client) UpdateUserAPISecret(id models.ID) (*user.User, error)

func (*Client) UpdateUserDisplayName

func (client *Client) UpdateUserDisplayName(id models.ID, displayName safe.VarChar) (*user.User, error)

func (*Client) UpdateUserPassword

func (client *Client) UpdateUserPassword(id models.ID, password safe.Password) (*user.User, error)

func (*Client) UpdateUserStatus

func (client *Client) UpdateUserStatus(id models.ID, status models.Status) (*user.User, error)

type ResponseErr

type ResponseErr struct {
	StatusCode int
	Msg        string
}

func (ResponseErr) Error

func (r ResponseErr) Error() string

Jump to

Keyboard shortcuts

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