memory

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 16, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InMemoryTaskRepository

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

InMemoryTaskRepository is an in-memory task repository.

func NewInMemoryTaskRepository

func NewInMemoryTaskRepository() *InMemoryTaskRepository

NewInMemoryTaskRepository creates a new instance of InMemoryTaskRepository.

func (*InMemoryTaskRepository) Create

func (r *InMemoryTaskRepository) Create(ctx context.Context, task *entities.Task) error

Create adds a new task to the repository.

func (*InMemoryTaskRepository) Delete

func (r *InMemoryTaskRepository) Delete(ctx context.Context, id uuid.UUID) error

Delete removes a task from the repository.

func (*InMemoryTaskRepository) FindAll

func (r *InMemoryTaskRepository) FindAll(ctx context.Context) ([]*entities.Task, error)

FindAll returns all tasks in the repository.

func (*InMemoryTaskRepository) FindByID

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

FindByID returns the task with the specified ID.

func (*InMemoryTaskRepository) Update

func (r *InMemoryTaskRepository) Update(ctx context.Context, task *entities.Task) error

Update updates an existing task in the repository.

type InMemoryTaskRunRepository

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

InMemoryTaskRunRepository is an in-memory task run repository.

func NewInMemoryTaskRunRepository

func NewInMemoryTaskRunRepository() *InMemoryTaskRunRepository

NewInMemoryTaskRunRepository creates a new instance of InMemoryTaskRunRepository.

func (*InMemoryTaskRunRepository) Create

Create adds a new task run to the repository.

func (*InMemoryTaskRunRepository) Delete

Delete removes a task run from the repository.

func (*InMemoryTaskRunRepository) FindAll

FindAll returns all task runs in the repository.

func (*InMemoryTaskRunRepository) FindByID

FindByID returns the task run with the specified ID.

func (*InMemoryTaskRunRepository) FindByTaskID added in v0.2.0

func (r *InMemoryTaskRunRepository) FindByTaskID(ctx context.Context, taskID uuid.UUID) ([]*entities.TaskRun, error)

FindByTaskID returns all task runs for a task.

func (*InMemoryTaskRunRepository) Update

Update updates an existing task run in the repository.

type InMemoryTeamRepository

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

InMemoryTeamRepository is an in-memory repository that manages teams.

func NewInMemoryTeamRepository

func NewInMemoryTeamRepository() *InMemoryTeamRepository

NewInMemoryTeamRepository creates a new in-memory team repository.

func (*InMemoryTeamRepository) AddMember

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

AddMember adds a member to a team.

func (*InMemoryTeamRepository) Create

func (r *InMemoryTeamRepository) Create(ctx context.Context, team *entities.Team) error

Create adds a new team to the repository.

func (*InMemoryTeamRepository) Delete

func (r *InMemoryTeamRepository) Delete(ctx context.Context, id uuid.UUID) error

Delete removes a team from the repository.

func (*InMemoryTeamRepository) FindAll

func (r *InMemoryTeamRepository) FindAll(ctx context.Context) ([]*entities.Team, error)

FindAll returns all teams in the repository.

func (*InMemoryTeamRepository) FindByID

func (r *InMemoryTeamRepository) FindByID(ctx context.Context, id uuid.UUID) (*entities.Team, error)

FindByID returns the team with the specified ID.

func (*InMemoryTeamRepository) RemoveMember

func (r *InMemoryTeamRepository) RemoveMember(ctx context.Context, teamID, userID uuid.UUID) error

RemoveMember removes a member from a team.

func (*InMemoryTeamRepository) Update

func (r *InMemoryTeamRepository) Update(ctx context.Context, team *entities.Team) error

Update updates an existing team in the repository.

func (*InMemoryTeamRepository) UpdateMemberRole

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

UpdateMemberRole updates the role of a member in a team.

type InMemoryUserRepository

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

InMemoryUserRepository is an in-memory user repository.

func NewInMemoryUserRepository

func NewInMemoryUserRepository() *InMemoryUserRepository

NewInMemoryUserRepository creates a new in-memory user repository.

func (*InMemoryUserRepository) Create

func (r *InMemoryUserRepository) Create(ctx context.Context, user *entities.User) error

Create adds a new user to the repository.

func (*InMemoryUserRepository) Delete

func (r *InMemoryUserRepository) Delete(ctx context.Context, id uuid.UUID) error

Delete removes a user from the repository.

func (*InMemoryUserRepository) FindAll

func (r *InMemoryUserRepository) FindAll(ctx context.Context) ([]*entities.User, error)

FindAll returns all users in the repository.

func (*InMemoryUserRepository) FindByID

func (r *InMemoryUserRepository) FindByID(ctx context.Context, id uuid.UUID) (*entities.User, error)

FindByID returns the user with the specified ID.

func (*InMemoryUserRepository) Update

func (r *InMemoryUserRepository) Update(ctx context.Context, user *entities.User) error

Update updates an existing user in the repository.

type TriggerRepository

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

TriggerRepository is a repository that manages triggers in memory.

func NewInMemoryTriggerRepository

func NewInMemoryTriggerRepository() *TriggerRepository

NewInMemoryTriggerRepository creates a new in-memory trigger repository.

func (*TriggerRepository) Create

func (r *TriggerRepository) Create(ctx context.Context, trigger *entities.Trigger) error

Create creates a new trigger.

func (*TriggerRepository) Delete

func (r *TriggerRepository) Delete(ctx context.Context, id uuid.UUID) error

Delete deletes a trigger by ID.

func (*TriggerRepository) FindAll

func (r *TriggerRepository) FindAll(ctx context.Context) ([]*entities.Trigger, error)

FindAll returns all triggers.

func (*TriggerRepository) FindByID

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

FindByID returns a trigger by ID.

func (*TriggerRepository) Update

func (r *TriggerRepository) Update(ctx context.Context, trigger *entities.Trigger) error

Update updates a trigger.

Jump to

Keyboard shortcuts

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