usecase

package
v0.0.0-...-f316938 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthUsecase

type AuthUsecase interface {
	CreateToken(context.Context, entity.User) (entity.Token, error)
	VerifyAccessToken(ctx context.Context, tokenString string) (userId ulid.ULID, err error)
	RefreshToken(ctx context.Context, refreshToken string) (entity.Token, error)
}

func NewAuthUsecase

func NewAuthUsecase(cfg *config.Config, logger *zap.Logger, ar repository.AuthRepository) AuthUsecase

type EventUsecase

type EventUsecase interface {
	// イベント作成
	Create(ctx context.Context, event entity.Event, owner entity.User) (entity.Event, error)
	// イベント情報取得
	RetrieveEventAllData(ctx context.Context, eventId ulid.ULID) (entity.Event, error)
	// イベント回答登録
	CreateUserAnswer(ctx context.Context, eventId ulid.ULID, answer entity.UserEventAnswer, user entity.User) (entity.UserEventAnswer, error)
}

func NewEventUsecase

func NewEventUsecase(cfg *config.Config, er repository.EventRepository) EventUsecase

type OauthUsecase

type OauthUsecase interface {
	GetAuthURL(ctx context.Context, provider string) (string, string, error)
	LoginWithCode(ctx context.Context, provider string, user *entity.User, code string) (entity.User, error)
}

type UserUsecase

type UserUsecase interface {
	CreateAnonymousUser(ctx context.Context) (entity.User, error)
	FindUserByID(ctx context.Context, id ulid.ULID) (entity.User, error)

	RetrieveUserProviders(ctx context.Context, user entity.User) ([]entity.OauthProvider, []entity.OauthUserInfo, error)
	// Register(ctx context.Context, user entity.User) ([]entity.CalendarEvent, error)
	FetchExternalCalendars(ctx context.Context, user entity.User, timeMin *time.Time, timeMax *time.Time) ([]entity.Calendar, error)
	ListEvents(ctx context.Context, user entity.User) ([]entity.Event, error)
}

Jump to

Keyboard shortcuts

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