Documentation ¶
Index ¶
- Variables
- type GitHubItem
- type GitHubRepo
- type GitHubUsecase
- func (uc *GitHubUsecase) GetAvatar(ctx context.Context) (*model.GitHubUser, error)
- func (uc *GitHubUsecase) ListSessions(ctx context.Context) ([]*model.Session, error)
- func (uc *GitHubUsecase) ListUsers(ctx context.Context) ([]*model.GitHubUser, error)
- func (uc *GitHubUsecase) Logout(ctx context.Context) (bool, error)
- type TodoItem
- type TodoRepo
- type TodoUsecase
- func (uc *TodoUsecase) AddItem(ctx context.Context, item *TodoItem) (*TodoItem, error)
- func (uc *TodoUsecase) Delete(ctx context.Context, item *TodoItem) ([]*TodoItem, error)
- func (uc *TodoUsecase) List(ctx context.Context) ([]*TodoItem, error)
- func (uc *TodoUsecase) Mark(ctx context.Context, item *TodoItem) (*TodoItem, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ProviderSet = wire.NewSet(NewTodoUsecase, NewGitHubUsecase)
ProviderSet is biz providers.
Functions ¶
This section is empty.
Types ¶
type GitHubItem ¶
type GitHubItem struct {
Id string
}
type GitHubRepo ¶
type GitHubRepo interface { Save(context.Context, *model.Session) (*model.Session, error) SaveUser(context.Context, *model.GitHubUser) (*model.GitHubUser, error) Update(context.Context, *model.Session) (*model.Session, error) DeleteByGhId(context.Context, uint32) (*model.Session, error) FindByID(context.Context, string) (*model.Session, error) FindUserByID(context.Context, uint32) (*model.GitHubUser, error) ListAll(context.Context) ([]*model.Session, error) ListAllUsers(context.Context) ([]*model.GitHubUser, error) }
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 (*GitHubUsecase) ListUsers ¶
func (uc *GitHubUsecase) ListUsers(ctx context.Context) ([]*model.GitHubUser, error)
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
Click to show internal directories.
Click to hide internal directories.