roles

package
v1.1.15 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRolesByOrgID

func GetRolesByOrgID(ctx context.ServiceContext, client *clients.GQLClient, org_id string) (*[]Role, error)

Fetches all the roles in an organisation.

Types

type CRUD added in v1.1.7

type CRUD struct {
	Create bool `json:"create,omitempty"`
	Read   bool `json:"read,omitempty"`
	Update bool `json:"update,omitempty"`
	Delete bool `json:"delete,omitempty"`
}

type Permissions added in v1.1.7

type Permissions struct {

	//	Other members and their permissions.
	Permissions CRUD `json:"permissions,omitempty"`

	//	Projects and their environments.
	Projects CRUD `json:"projects,omitempty"`

	//	Environments and their secrets.
	Environments CRUD `json:"environments,omitempty"`

	//	Add/Delete Integrations.
	Integrations CRUD `json:"integrations,omitempty"`
}

type Role

type Role struct {
	ID        string    `json:"id,omitempty"`
	CreatedAt time.Time `json:"created_at,omitempty"`
	UpdatedAt time.Time `json:"updated_at,omitempty"`

	Name string `json:"name"`

	OrgID string `json:"org_id,omitempty"`

	Permissions string `json:"permissions,omitempty"`
}

func Insert

func Insert(ctx context.ServiceContext, client *clients.GQLClient, options *RoleInsertOptions) (*Role, error)

Insert new permissions.

type RoleInsertOptions

type RoleInsertOptions struct {
	OrgID       string      `json:"org_id,omitempty"`
	Name        string      `json:"name"`
	Permissions Permissions `json:"permissions,omitempty"`
}

Jump to

Keyboard shortcuts

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