entities

package
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrInvalidOrganization added in v0.5.0

type ErrInvalidOrganization struct{}

ErrInvalidOrganization is an error that is returned when a organization is invalid

func (ErrInvalidOrganization) Error added in v0.5.0

func (e ErrInvalidOrganization) Error() string

type ErrMemberAlreadyExists

type ErrMemberAlreadyExists struct{}

ErrMemberAlreadyExists is an error that is returned when a member already exists.

func (ErrMemberAlreadyExists) Error

func (e ErrMemberAlreadyExists) Error() string

type ErrMemberInvalid

type ErrMemberInvalid struct{}

ErrMemberInvalid is an error that is returned when a member is invalid.

func (ErrMemberInvalid) Error

func (e ErrMemberInvalid) Error() string

type ErrMemberNotFound

type ErrMemberNotFound struct{}

ErrMemberNotFound is an error that is returned when a member is not found.

func (ErrMemberNotFound) Error

func (e ErrMemberNotFound) Error() string

type ErrOrganizationAlreadyExists added in v0.5.0

type ErrOrganizationAlreadyExists struct{}

ErrOrganizationAlreadyExists is an error that is returned when a organization already exists

func (ErrOrganizationAlreadyExists) Error added in v0.5.0

type ErrOrganizationMemberNotFound added in v0.5.0

type ErrOrganizationMemberNotFound struct{}

ErrOrganizationMemberNotFound is an error that is returned when a organization member is not found

func (ErrOrganizationMemberNotFound) Error added in v0.5.0

type ErrOrganizationNotFound added in v0.5.0

type ErrOrganizationNotFound struct{}

ErrOrganizationNotFound is an error that is returned when a organization is not found

func (ErrOrganizationNotFound) Error added in v0.5.0

func (e ErrOrganizationNotFound) Error() string

type ErrTaskAlreadyExists

type ErrTaskAlreadyExists struct{}

ErrTaskAlreadyExists is an error that is returned when a task already exists.

func (ErrTaskAlreadyExists) Error

func (e ErrTaskAlreadyExists) Error() string

type ErrTaskInvalid

type ErrTaskInvalid struct{}

ErrTaskInvalid is an error that is returned when a task is invalid.

func (ErrTaskInvalid) Error

func (e ErrTaskInvalid) Error() string

type ErrTaskNotFound

type ErrTaskNotFound struct{}

ErrTaskNotFound is an error that is returned when a task is not found.

func (ErrTaskNotFound) Error

func (e ErrTaskNotFound) Error() string

type ErrTaskRunAlreadyExists

type ErrTaskRunAlreadyExists struct{}

ErrTaskRunAlreadyExists is an error that is returned when a task run already exists.

func (ErrTaskRunAlreadyExists) Error

func (e ErrTaskRunAlreadyExists) Error() string

type ErrTaskRunFailed added in v0.2.0

type ErrTaskRunFailed struct{}

ErrTaskRunFailed is an error that is returned when a task run has failed.

func (ErrTaskRunFailed) Error added in v0.2.0

func (e ErrTaskRunFailed) Error() string

type ErrTaskRunInvalid

type ErrTaskRunInvalid struct{}

ErrTaskRunInvalid is an error that is returned when a task run is invalid.

func (ErrTaskRunInvalid) Error

func (e ErrTaskRunInvalid) Error() string

type ErrTaskRunNotFound

type ErrTaskRunNotFound struct{}

ErrTaskRunNotFound is an error that is returned when a task run is not found.

func (ErrTaskRunNotFound) Error

func (e ErrTaskRunNotFound) Error() string

type ErrTaskTitleRequired

type ErrTaskTitleRequired struct{}

ErrTaskTitleRequired is an error that is returned when a task title is required.

func (ErrTaskTitleRequired) Error

func (e ErrTaskTitleRequired) Error() string

type ErrTeamAlreadyExists

type ErrTeamAlreadyExists struct{}

ErrTeamAlreadyExists is an error that is returned when a team already exists.

func (ErrTeamAlreadyExists) Error

func (e ErrTeamAlreadyExists) Error() string

type ErrTeamInvalid

type ErrTeamInvalid struct{}

ErrTeamInvalid is an error that is returned when a team is invalid.

func (ErrTeamInvalid) Error

func (e ErrTeamInvalid) Error() string

type ErrTeamNotFound

type ErrTeamNotFound struct{}

ErrTeamNotFound is an error that is returned when a team is not found.

func (ErrTeamNotFound) Error

func (e ErrTeamNotFound) Error() string

type ErrTriggerAlreadyExists

type ErrTriggerAlreadyExists struct{}

ErrTriggerAlreadyExists is an error that is returned when a trigger already exists.

func (ErrTriggerAlreadyExists) Error

func (e ErrTriggerAlreadyExists) Error() string

type ErrTriggerNotFound

type ErrTriggerNotFound struct{}

ErrTriggerNotFound is an error that is returned when a trigger is not found.

func (ErrTriggerNotFound) Error

func (e ErrTriggerNotFound) Error() string

type ErrUserAlreadyExists

type ErrUserAlreadyExists struct{}

ErrUserAlreadyExists is an error that is returned when a user already exists.

func (ErrUserAlreadyExists) Error

func (e ErrUserAlreadyExists) Error() string

type ErrUserInvalid

type ErrUserInvalid struct{}

ErrUserInvalid is an error that is returned when a user is invalid.

func (ErrUserInvalid) Error

func (e ErrUserInvalid) Error() string

type ErrUserNotFound

type ErrUserNotFound struct{}

ErrUserNotFound is an error that is returned when a user is not found.

func (ErrUserNotFound) Error

func (e ErrUserNotFound) Error() string

type Organization added in v0.5.0

type Organization struct {
	*OrganizationConfig
}

func NewOrganization added in v0.5.0

func NewOrganization(config *OrganizationConfig) (*Organization, error)

type OrganizationConfig added in v0.5.0

type OrganizationConfig struct {
	ID      uuid.UUID                         `json:"id"`
	Name    string                            `json:"name"`
	Teams   map[uuid.UUID]*OrganizationTeam   `json:"teams"`
	Members map[uuid.UUID]*OrganizationMember `json:"members"`
}

type OrganizationMember added in v0.5.0

type OrganizationMember struct {
	*OrganizationMemberConfig
}

func NewOrganizationMember added in v0.5.0

func NewOrganizationMember(config *OrganizationMemberConfig) (*OrganizationMember, error)

type OrganizationMemberConfig added in v0.5.0

type OrganizationMemberConfig struct {
	ID     uuid.UUID `json:"id"`
	OrgID  uuid.UUID `json:"org_id"`
	UserID uuid.UUID `json:"user_id"`
	Role   string    `json:"role"`
}

type OrganizationTeam added in v0.5.0

type OrganizationTeam struct {
	*OrganizationTeamConfig
}

func NewOrganizationTeam added in v0.5.0

func NewOrganizationTeam(config *OrganizationTeamConfig) (*OrganizationTeam, error)

type OrganizationTeamConfig added in v0.5.0

type OrganizationTeamConfig struct {
	ID     uuid.UUID `json:"id"`
	OrgID  uuid.UUID `json:"org_id"`
	TeamID uuid.UUID `json:"team_id"`
}

type Task

type Task struct {
	*TaskConfig
}

func NewTask

func NewTask(config *TaskConfig) (*Task, error)

NewTask creates a new Task with the given configuration and default values.

type TaskConfig

type TaskConfig struct {
	ID          uuid.UUID     `json:"id"`
	Name        string        `json:"name"`
	Namespace   string        `json:"namespace"`
	Description string        `json:"description"`
	Timeout     time.Duration `json:"timeout"`
	*TaskScope
	*tekton.TaskSpec
}

type TaskRun

type TaskRun struct {
	*TaskRunConfig
}

func NewTaskRun

func NewTaskRun(config *TaskRunConfig) (*TaskRun, error)

NewTaskRun creates a new TaskRun with the given configuration and default values.

type TaskRunConfig

type TaskRunConfig struct {
	ID     uuid.UUID
	TaskID uuid.UUID
	*tekton.TaskRun
}

type TaskScope added in v0.5.0

type TaskScope struct {
	Owner         uuid.UUID       `json:"owner"`         // Owner of the task
	Organizations []*Organization `json:"organizations"` // Organization that can access the task
	Teams         []*Team         `json:"teams"`         // Team that can access the task
	Users         []*User         `json:"users"`         // User that can access the task
}

type Team

type Team struct {
	*TeamConfig
}

func NewTeam added in v0.5.0

func NewTeam(config *TeamConfig) (*Team, error)

type TeamConfig

type TeamConfig struct {
	ID      uuid.UUID                 `json:"id"`
	Name    string                    `json:"name"`
	Members map[uuid.UUID]*TeamMember `json:"members"`
}

type TeamMember added in v0.5.0

type TeamMember struct {
	ID     uuid.UUID `json:"id"`
	TeamID uuid.UUID `json:"team_id"`
	UserID uuid.UUID `json:"user_id"`
	Role   string    `json:"role"`
}

type Trigger

type Trigger struct {
	*TriggerConfig
}

Trigger represents a trigger.

func NewTrigger

func NewTrigger(config *TriggerConfig) (*Trigger, error)

NewTrigger creates a new Trigger with the given configuration and default values.

type TriggerCategory

type TriggerCategory string

TriggerCategory represents a trigger category.

const (
	// TriggerCategorySchedule represents a schedule trigger category.
	TriggerCategorySchedule TriggerCategory = "schedule"
	// TriggerCategoryWebhook represents a webhook trigger category.
	TriggerCategoryWebhook TriggerCategory = "webhook"
)

type TriggerConfig

type TriggerConfig struct {
	ID          uuid.UUID `json:"id"`
	Title       string    `json:"title"`
	Description string    `json:"description"`
	Category    string    `json:"category"`
}

TriggerConfig represents the configuration of a trigger.

type User

type User struct {
	*UserConfig
}

func NewUser

func NewUser(config *UserConfig) (*User, error)

NewUser creates a new User with the given configuration and default values.

type UserConfig

type UserConfig struct {
	ID         uuid.UUID `json:"id"`
	Slug       string    `json:"slug"`
	Name       string    `json:"name"`
	Email      string    `json:"email"`
	Password   string    `json:"password"`
	SystemRole string    `json:"system_role"`
}

Jump to

Keyboard shortcuts

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