biz

package
v0.0.0-...-ce2ccc6 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2023 License: MIT Imports: 7 Imported by: 0

README

Biz

Documentation

Index

Constants

This section is empty.

Variables

ProviderSet is biz providers.

Functions

This section is empty.

Types

type GitHubItem

type GitHubItem struct {
	Id string
}

type GitHubUsecase

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

func NewGitHubUsecase

func NewGitHubUsecase(repo GitHubRepo, logger log.Logger) *GitHubUsecase

func (*GitHubUsecase) GetAvatar

func (uc *GitHubUsecase) GetAvatar(ctx context.Context) (*model.GitHubUser, error)

func (*GitHubUsecase) ListSessions

func (uc *GitHubUsecase) ListSessions(ctx context.Context) ([]*model.Session, error)

func (*GitHubUsecase) ListUsers

func (uc *GitHubUsecase) ListUsers(ctx context.Context) ([]*model.GitHubUser, error)

func (*GitHubUsecase) Logout

func (uc *GitHubUsecase) Logout(ctx context.Context) (bool, error)

type TodoItem

type TodoItem struct {
	Id          string
	Title       string
	Description string
	Marked      bool
	CreatedAt   time.Time
	UpdatedAt   time.Time
}

type TodoRepo

type TodoRepo interface {
	Save(context.Context, *TodoItem) (*TodoItem, error)
	Update(context.Context, *TodoItem) (*TodoItem, error)
	DeleteByID(context.Context, string) (*TodoItem, error)
	DeleteByTitle(context.Context, string) ([]*TodoItem, error)
	FindByID(context.Context, string) (*TodoItem, error)
	ListAll(context.Context) ([]*TodoItem, error)
}

type TodoUsecase

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

func NewTodoUsecase

func NewTodoUsecase(repo TodoRepo, logger log.Logger) *TodoUsecase

func (*TodoUsecase) AddItem

func (uc *TodoUsecase) AddItem(ctx context.Context, item *TodoItem) (*TodoItem, error)

func (*TodoUsecase) Delete

func (uc *TodoUsecase) Delete(ctx context.Context, item *TodoItem) ([]*TodoItem, error)

func (*TodoUsecase) List

func (uc *TodoUsecase) List(ctx context.Context) ([]*TodoItem, error)

func (*TodoUsecase) Mark

func (uc *TodoUsecase) Mark(ctx context.Context, item *TodoItem) (*TodoItem, error)

Jump to

Keyboard shortcuts

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