visibility

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RoleSliceToJSON

func RoleSliceToJSON(in []Role) json.RawMessage

func VisibilitySliceToJSON

func VisibilitySliceToJSON(e []Visibility) json.RawMessage

func VisibilityToJSON

func VisibilityToJSON(e Visibility) json.RawMessage

Types

type Role

type Role int64
const (
	ROLE_INVALID Role = iota
	ROLE_ADMIN
	ROLE_DEVELOPER
	ROLE_DATA_MANAGER
	ROLE_DATA_ANALYST
	ROLE_VIEWER
)

func JSONToRoleSlice

func JSONToRoleSlice(in json.RawMessage) []Role

func RoleFromPointerString

func RoleFromPointerString(in *string) Role

func RoleFromString

func RoleFromString(in string) Role

func (Role) String

func (e Role) String() string

func (Role) StringPtr

func (e Role) StringPtr() *string

func (Role) ToInt64

func (e Role) ToInt64() int64

type Visibility

type Visibility struct {
	UUID              uuid.UUID   `json:"uuid"`
	Description       string      `json:"description"`
	OrganizationUUIDs []uuid.UUID `json:"organization_uuids"`
	TeamUUIDs         []uuid.UUID `json:"team_uuids"`
	UserUUIDs         []uuid.UUID `json:"user_uuids"`
	Roles             []Role      `json:"roles"`
	CreatedAt         time.Time   `json:"created_at"`
	UpdatedAt         time.Time   `json:"updated_at"`
	CreatedByUUID     uuid.UUID   `json:"created_by_uuid"`
	UpdatedByUUID     uuid.UUID   `json:"updated_by_uuid"`
}

func NewVisibilitySliceWithRandomValues

func NewVisibilitySliceWithRandomValues(n int) []Visibility

func NewVisibilityWithRandomValues

func NewVisibilityWithRandomValues() Visibility

func VisibilityFromJSON

func VisibilityFromJSON(data json.RawMessage) Visibility

func VisibilitySliceFromJSON

func VisibilitySliceFromJSON(data json.RawMessage) []Visibility

func (Visibility) ArrayFieldIdentifierToType

func (e Visibility) ArrayFieldIdentifierToType() map[string]types.FieldType

func (Visibility) EntityIdentifier

func (e Visibility) EntityIdentifier() string

func (Visibility) FieldIdentfierToTypeMap

func (e Visibility) FieldIdentfierToTypeMap() map[string]types.FieldType

func (Visibility) IsDependant

func (e Visibility) IsDependant() bool

func (Visibility) String

func (e Visibility) String() string

func (Visibility) ToJSON

func (e Visibility) ToJSON() json.RawMessage

Jump to

Keyboard shortcuts

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