services

package
v0.4.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TaskService

type TaskService struct {
	// contains filtered or unexported fields
}

TaskService is a service that manages tasks.

func NewTaskService

func NewTaskService(taskRepo repositories.TaskRepository, taskRunRepo repositories.TaskRunRepository, tektonClient tektoncd.TektonClient) *TaskService

NewTaskService creates a new TaskService.

func (*TaskService) Create

func (s *TaskService) Create(ctx context.Context, task *entities.Task) error

Create creates a new task.

func (*TaskService) Delete

func (s *TaskService) Delete(ctx context.Context, id uuid.UUID) error

Delete deletes a task by ID.

func (*TaskService) FindAll

func (s *TaskService) FindAll(ctx context.Context) ([]*entities.Task, error)

FindAll returns all tasks.

func (*TaskService) FindByID

func (s *TaskService) FindByID(ctx context.Context, id uuid.UUID) (*entities.Task, error)

FindByID returns a task by ID.

func (*TaskService) FindTaskRunByID added in v0.2.0

func (s *TaskService) FindTaskRunByID(ctx context.Context, taskID uuid.UUID, taskRunID uuid.UUID) (*entities.TaskRun, error)

FindTaskRunByID returns a task run by ID.

func (*TaskService) FindTaskRunLogs added in v0.2.0

func (s *TaskService) FindTaskRunLogs(ctx context.Context, taskID uuid.UUID, taskRunID uuid.UUID) (string, error)

FindTaskRunLogs returns a stream of logs for a task run.

func (*TaskService) FindTaskRunStatus added in v0.4.0

func (s *TaskService) FindTaskRunStatus(ctx context.Context, taskID uuid.UUID, taskRunID uuid.UUID) (tekton.TaskRunStatus, error)

FindTaskRunStatus returns the status of a task run.

func (*TaskService) FindTaskRuns added in v0.2.0

func (s *TaskService) FindTaskRuns(ctx context.Context, taskID uuid.UUID) ([]*entities.TaskRun, error)

FindTaskRuns returns all task runs for a task.

func (*TaskService) Run

func (s *TaskService) Run(ctx context.Context, taskID uuid.UUID, taskRunID uuid.UUID) error

Run runs a task.

func (*TaskService) Update

func (s *TaskService) Update(ctx context.Context, task *entities.Task) error

Update updates a task.

type TeamService

type TeamService struct {
	// contains filtered or unexported fields
}

func NewTeamService

func NewTeamService(repo repositories.TeamRepository) *TeamService

func (*TeamService) AddMember

func (s *TeamService) AddMember(ctx context.Context, teamID, userID uuid.UUID, role string) error

func (*TeamService) CreateTeam

func (s *TeamService) CreateTeam(ctx context.Context, team *entities.Team) error

func (*TeamService) DeleteTeam

func (s *TeamService) DeleteTeam(ctx context.Context, id uuid.UUID) error

func (*TeamService) GetTeam

func (s *TeamService) GetTeam(ctx context.Context, id uuid.UUID) (*entities.Team, error)

func (*TeamService) GetTeams

func (s *TeamService) GetTeams(ctx context.Context) ([]*entities.Team, error)

func (*TeamService) RemoveMember

func (s *TeamService) RemoveMember(ctx context.Context, teamID, userID uuid.UUID) error

func (*TeamService) UpdateMemberRole

func (s *TeamService) UpdateMemberRole(ctx context.Context, teamID, userID uuid.UUID, role string) error

func (*TeamService) UpdateTeam

func (s *TeamService) UpdateTeam(ctx context.Context, team *entities.Team) error

type TriggerService

type TriggerService struct {
	// contains filtered or unexported fields
}

TriggerService is a service that manages triggers.

func NewTriggerService

func NewTriggerService(repo repositories.TriggerRepository) *TriggerService

NewTriggerService creates a new TriggerService.

func (*TriggerService) Create

func (s *TriggerService) Create(ctx context.Context, trigger *entities.Trigger) error

Create creates a new trigger.

func (*TriggerService) Delete

func (s *TriggerService) Delete(ctx context.Context, id uuid.UUID) error

Delete deletes a trigger by ID.

func (*TriggerService) FindAll

func (s *TriggerService) FindAll(ctx context.Context) ([]*entities.Trigger, error)

FindAll returns all triggers.

func (*TriggerService) FindByID

func (s *TriggerService) FindByID(ctx context.Context, id uuid.UUID) (*entities.Trigger, error)

FindByID returns a trigger by ID.

func (*TriggerService) Update

func (s *TriggerService) Update(ctx context.Context, trigger *entities.Trigger) error

Update updates a trigger.

type UserService

type UserService struct {
	// contains filtered or unexported fields
}

func NewUserService

func NewUserService(repo repositories.UserRepository) *UserService

func (*UserService) CreateUser

func (s *UserService) CreateUser(ctx context.Context, user *entities.User) error

func (*UserService) DeleteUser

func (s *UserService) DeleteUser(ctx context.Context, id uuid.UUID) error

func (*UserService) FindAll added in v0.3.0

func (s *UserService) FindAll(ctx context.Context) ([]*entities.User, error)

FindAll returns all users

func (*UserService) GetUser

func (s *UserService) GetUser(ctx context.Context, id uuid.UUID) (*entities.User, error)

func (*UserService) GetUserByEmail

func (s *UserService) GetUserByEmail(ctx context.Context, email string) (*entities.User, error)

func (*UserService) GetUsers

func (s *UserService) GetUsers(ctx context.Context) ([]*entities.User, error)

func (*UserService) UpdateUser

func (s *UserService) UpdateUser(ctx context.Context, user *entities.User) error

Jump to

Keyboard shortcuts

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