models

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: May 21, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultProjectSchedulerTimezone = "UTC"

The default timezone for the scheduler

Variables

This section is empty.

Functions

func IsEmptyStringPointer added in v0.9.0

func IsEmptyStringPointer(s *string) bool

IsEmptyStringPointer returns true if the string pointer is nil or empty

Types

type BaseUser

type BaseUser struct {
	UserUUID string `json:"userUuid"`
}

type ChildSpace added in v0.9.0

type ChildSpace struct {
	SpaceUUID  string
	SpaceName  string
	IsPrivate  bool
	AccessList []SpaceMemberAccess
}

ChildSpace represents a nested space within a parent space

type CredentialsDetail added in v0.9.0

type CredentialsDetail struct {
	Type string `json:"type"`
	User string `json:"user,omitempty"`
}

type OrganizationGroup added in v0.8.1

type OrganizationGroup struct {
	OrganizationUUID string
	GroupUUID        string
	Name             string
	CreatedAt        string
}

type OrganizationMemberRole

type OrganizationMemberRole string
const (
	ORGANIZATION_MEMBER_ROLE             OrganizationMemberRole = "member"
	ORGANIZATION_VIEWER_ROLE             OrganizationMemberRole = "viewer"
	ORGANIZATION_INTERACTIVE_VIEWER_ROLE OrganizationMemberRole = "interactive_viewer"
	ORGANIZATION_EDITOR_ROLE             OrganizationMemberRole = "editor"
	ORGANIZATION_DEVELOPER_ROLE          OrganizationMemberRole = "developer"
	ORGANIZATION_ADMIN_ROLE              OrganizationMemberRole = "admin"
)

List of OrganizationMemberRole

func (OrganizationMemberRole) IsValid added in v0.9.0

func (e OrganizationMemberRole) IsValid() bool

Check if a given string is a valid OrganizationMemberRole

func (OrganizationMemberRole) String

func (e OrganizationMemberRole) String() string

default string

type ProjectMember added in v0.9.0

type ProjectMember struct {
	ProjectUUID string
	UserUUID    string
	Email       *string
	ProjectRole ProjectMemberRole
}

type ProjectMemberRole

type ProjectMemberRole string
const (
	PROJECT_VIEWER_ROLE             ProjectMemberRole = "viewer"
	PROJECT_INTERACTIVE_VIEWER_ROLE ProjectMemberRole = "interactive_viewer"
	PROJECT_EDITOR_ROLE             ProjectMemberRole = "editor"
	PROJECT_DEVELOPER_ROLE          ProjectMemberRole = "developer"
	PROJECT_ADMIN_ROLE              ProjectMemberRole = "admin"
)

List of ProjectMemberRole

func (ProjectMemberRole) IsValid added in v0.9.0

func (s ProjectMemberRole) IsValid() bool

Check if a given string is a valid ProjectMemberRole

func (ProjectMemberRole) String

func (s ProjectMemberRole) String() string

convert ProjectMemberRole to string

type ProjectSchedulerSettings added in v0.8.0

type ProjectSchedulerSettings struct {
	SchedulerTimezone string `json:"schedulerTimezone" validate:"required"`
}

SchedulerSettings represents the scheduler settings for a project

func (*ProjectSchedulerSettings) GetSchedulerTimezone added in v0.8.0

func (s *ProjectSchedulerSettings) GetSchedulerTimezone() string

GetSchedulerTimezone returns the scheduler timezone for the project

type ProjectType

type ProjectType string
const (
	DEFAULT_PROJECT_TYPE ProjectType = "DEFAULT"
	PREVIEW_PROJECT_TYPE ProjectType = "PREVIEW"
)

List of ProjectType

type SpaceAccessGroup added in v0.9.0

type SpaceAccessGroup struct {
	GroupUUID string
	SpaceRole SpaceMemberRole
}

SpaceAccessGroup represents a group's access to a space as returned by the API

type SpaceAccessMember added in v0.9.0

type SpaceAccessMember struct {
	UserUUID  string
	SpaceRole SpaceMemberRole
}

SpaceAccessMember represents the core information for a space access member used in requests.

type SpaceDetails added in v0.9.0

type SpaceDetails struct {
	ProjectUUID        string
	SpaceUUID          string
	ParentSpaceUUID    *string
	SpaceName          string
	IsPrivate          bool
	SpaceAccessMembers []SpaceMemberAccess // Full list from API for access_all
	SpaceAccessGroups  []SpaceAccessGroup  // Full list from API for group_access_all
	ChildSpaces        []ChildSpace        // Child spaces, if any
}

SpaceDetails contains all the details of a space returned by the GetSpace API. Note: For nested spaces, MemberAccess and GroupAccess lists will be empty as access is inherited.

func (*SpaceDetails) GetDirectMemberAccess added in v0.9.0

func (s *SpaceDetails) GetDirectMemberAccess() []SpaceMemberAccess

GetDirectMemberAccess returns only the members with direct access to the space

func (*SpaceDetails) GetGroupByUUID added in v0.9.0

func (s *SpaceDetails) GetGroupByUUID(groupUUID string) *SpaceAccessGroup

GetGroupByUUID returns a group by UUID, or nil if not found

func (*SpaceDetails) GetMemberByUUID added in v0.9.0

func (s *SpaceDetails) GetMemberByUUID(userUUID string) *SpaceMemberAccess

GetMemberByUUID returns a member by UUID, or nil if not found

func (*SpaceDetails) IsNestedSpace added in v0.9.0

func (s *SpaceDetails) IsNestedSpace() bool

IsNestedSpace returns true if the space is nested (has a parent)

func (*SpaceDetails) ResourceID added in v0.9.0

func (s *SpaceDetails) ResourceID() string

ResourceID returns the formatted resource ID for a space

type SpaceGroupAccess added in v0.9.0

type SpaceGroupAccess struct {
	GroupUUID string
	SpaceRole SpaceMemberRole
}

SpaceGroupAccess represents a group's access to a space

type SpaceMemberAccess added in v0.9.0

type SpaceMemberAccess struct {
	UserUUID  string
	SpaceRole SpaceMemberRole // Assuming SpaceMemberRole is also in models package
	// Fields from API response indicating how access is granted
	HasDirectAccess *bool   `json:"hasDirectAccess,omitempty"`
	InheritedRole   *string `json:"inheritedRole,omitempty"`
	InheritedFrom   *string `json:"inheritedFrom,omitempty"`
	ProjectRole     *string `json:"projectRole,omitempty"`
}

SpaceMemberAccess represents a user's access to a space as returned by the API

func (*SpaceMemberAccess) GetSpaceAccessType added in v0.9.0

func (s *SpaceMemberAccess) GetSpaceAccessType() *string

GetSpaceAccessType returns the type of space access for a member

func (*SpaceMemberAccess) HasDirectSpaceMemberAccess added in v0.9.0

func (s *SpaceMemberAccess) HasDirectSpaceMemberAccess() bool

HasDirectSpaceMemberAccess returns true if the member has direct access to the space

type SpaceMemberRole added in v0.5.0

type SpaceMemberRole string
const (
	SPACE_VIEWER_ROLE SpaceMemberRole = "viewer"
	SPACE_EDITOR_ROLE SpaceMemberRole = "editor"
	SPACE_ADMIN_ROLE  SpaceMemberRole = "admin"
)

List of ProjectMemberRole

func (SpaceMemberRole) IsValid added in v0.9.0

func (s SpaceMemberRole) IsValid() bool

Check if a given string is a valid SpaceMemberRole

func (SpaceMemberRole) String added in v0.5.0

func (s SpaceMemberRole) String() string

convert ProjectMemberRole to string

type WarehouseCredentials added in v0.9.0

type WarehouseCredentials struct {
	Credentials CredentialsDetail `json:"credentials"`
	UpdatedAt   time.Time         `json:"updatedAt"`
	CreatedAt   time.Time         `json:"createdAt"`
	Name        string            `json:"name"`
	UserUUID    string            `json:"userUuid,omitempty"`
	UUID        string            `json:"uuid"`
}

Jump to

Keyboard shortcuts

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