usecase

package
v0.0.1-alpha Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2024 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Credential

type Credential struct {
	AccessToken  string
	RefreshToken string
}

type GetCredentialsUseCase

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

func NewGetCredentialsUseCase

func NewGetCredentialsUseCase(repository oauthapp.Repository, providerRepository ProviderRepository) *GetCredentialsUseCase

func (*GetCredentialsUseCase) Execute

func (u *GetCredentialsUseCase) Execute(ctx context.Context, id string, ownerID string) (Credential, error)

type ListOAuthUseCase

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

func NewListOAuthUseCase

func NewListOAuthUseCase(repository oauthapp.Repository) *ListOAuthUseCase

func (*ListOAuthUseCase) Execute

func (u *ListOAuthUseCase) Execute(ctx context.Context, ownerID string) ([]*oauthapp.OAuthApp, error)

type LoadProvidersUseCase

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

func NewLoadProvidersUseCase

func NewLoadProvidersUseCase(providerRepository provider.Repository) *LoadProvidersUseCase

func (*LoadProvidersUseCase) Execute

func (u *LoadProvidersUseCase) Execute(ctx context.Context, providers []*provider.Provider) error

type ProviderConfig

type ProviderConfig struct {
	ClientID     string
	ClientSecret string
	Scopes       []string
	AuthURL      string
	TokenURL     string
	RedirectURL  string
}

type ProviderRepository

type ProviderRepository interface {
	Find(provider string) (*ProviderConfig, error)
}

type UseCase

type UseCase interface {
	Execute() (interface{}, error)
}

Jump to

Keyboard shortcuts

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