usecase

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2020 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Auth

type Auth interface {
	Auth(ctx context.Context, name, pwd string) error
	SignToken(ctx context.Context) ([]byte, error)
	VerifyToken(ctx context.Context, token []byte) error
}

type Branch

type Branch interface {
	CreateBranch(ctx context.Context, branchName []byte) (*sys.Branch, error)
	DeleteBranch(ctx context.Context, branchId []byte) error
}

type CodePushAdapter

type CodePushAdapter interface {
	CreateBranch(ctx context.Context, branchName []byte) (*pb.BranchResponse, error)
	DeleteBranch(ctx context.Context, branchId []byte) error
}

type CtorConfig

type CtorConfig struct {
	CodePushAdapter
	SessionAdapter
	log.Logger
}

type Options

type Options struct {
	RootUserName string
	RootUserPwd  string
}

type SessionAdapter

type SessionAdapter interface {
	GenerateAccessToken(ctx context.Context, issuer sessionAdapter.AccessTokenIssuer, subject string) ([]byte, error)
	VerifyAccessToken(ctx context.Context, token string) (subject []byte, err error)
}

type UseCase

type UseCase interface {
	Auth
	Branch
}

func NewUseCase

func NewUseCase(config CtorConfig, optionFns ...func(*Options)) UseCase

Jump to

Keyboard shortcuts

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