entities

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrInvalidSession added in v0.3.0

type ErrInvalidSession struct{}

ErrInvalidSession is an error that is returned when a session is invalid

func (ErrInvalidSession) Error added in v0.3.0

func (e ErrInvalidSession) 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 ErrSessionNotFound added in v0.3.0

type ErrSessionNotFound struct{}

ErrSessionNotFound is an error that is returned when a session is not found

func (ErrSessionNotFound) Error added in v0.3.0

func (e ErrSessionNotFound) 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 Member

type Member struct {
	UserID uuid.UUID `json:"user_id"`
	Role   string    `json:"role"`
}

type Session added in v0.3.0

type Session struct {
	*SessionConfig
}

func NewSession added in v0.3.0

func NewSession(config *SessionConfig) *Session

type SessionConfig added in v0.3.0

type SessionConfig struct {
	// ID is the id of the session
	ID uuid.UUID
	// UserID is the id of the user
	UserID string
	// Token is the token of the session
	Token string
	// ExpiresAt is the expiration time of the session
	ExpiresAt time.Duration
}

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"`
	Steps       []tekton.Step      `json:"steps"`
	Params      []tekton.ParamSpec `json:"params"`
}

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 Team

type Team struct {
	*TeamConfig
	Members map[uuid.UUID]*Member `json:"members"`
}

type TeamConfig

type TeamConfig struct {
	ID   uuid.UUID `json:"id"`
	Name string    `json:"name"`
}

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"`
	Role     string    `json:"role"`
}

Jump to

Keyboard shortcuts

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