beeswax

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: MPL-2.0 Imports: 7 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 {
	APIURL string
	// contains filtered or unexported fields
}

func NewClient

func NewClient(apiURL, email, password string) *Client

func (*Client) CreateRole

func (bx *Client) CreateRole(role Role) (int64, error)

func (*Client) CreateUser

func (bx *Client) CreateUser(user User) (int64, error)

func (*Client) DeleteRole

func (bx *Client) DeleteRole(roleID int64) error

func (*Client) DeleteUser

func (bx *Client) DeleteUser(userID int64) error

func (*Client) GetRole

func (bx *Client) GetRole(roleID int64) (Role, error)

func (*Client) GetRoles added in v1.0.5

func (bx *Client) GetRoles() ([]Role, error)

func (*Client) GetUser

func (bx *Client) GetUser(userID int64) (User, error)

func (*Client) Login

func (bx *Client) Login() error

func (*Client) UpdateRole

func (bx *Client) UpdateRole(role Role) error

func (*Client) UpdateUser

func (bx *Client) UpdateUser(user User) error

type Permission

type Permission struct {
	ObjectType string `json:"object_type"`
	Permission int64  `json:"permission"`
}

type Role

type Role struct {
	ID                   int64        `json:"id"`
	Name                 string       `json:"name"`
	ParentRoleID         int64        `json:"parent_role_id"`
	Archived             bool         `json:"archived"`
	Notes                string       `json:"notes"`
	SharedAcrossAccounts bool         `json:"shared_across_accounts"`
	Permissions          []Permission `json:"permissions"`
	ReportIDs            []int64      `json:"report_ids"`
}

type User

type User struct {
	ID               int64   `json:"id"`
	SuperUser        bool    `json:"super_user"`
	Email            string  `json:"email"`
	FirstName        string  `json:"first_name"`
	LastName         string  `json:"last_name"`
	RoleID           int64   `json:"role_id"`
	AccountID        int64   `json:"account_id"`
	Active           bool    `json:"active"`
	AllAccountAccess bool    `json:"all_account_access"`
	AccountGroupIDs  []int64 `json:"account_group_ids"`
}

Jump to

Keyboard shortcuts

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