service

package
v0.0.0-...-fade1fe Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(ctx context.Context, conf Configuration) (service, error)

New returns new instance of service

Types

type Configuration

type Configuration struct {
	// Logger
	Repository Repository
}

Configuration settings for service

type Repository

type Repository interface {
	SaveToken(ctx context.Context, tkn *token.Token) error
	GetToken(ctx context.Context, guid, accessToken string) (*token.Token, error)
	ChangeToken(ctx context.Context, guid, oldAccessToken, refreshToken, accessToken string) error
	RemoveToken(ctx context.Context, guid, accessToken string) error
	RemoveAllTokens(ctx context.Context, guid string) error
}

Repository represents database handler

Jump to

Keyboard shortcuts

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