Documentation

Overview

Package persistence holds view models and repository interfaces

Package persistence holds view models and repository interfaces

Package persistence holds view models and repository interfaces

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	GetID() string
	GetUserID() string
	GetSecret() string
	GetDomain() string
	GetData() json.RawMessage
}

Client the client persistence model interface

type ClientRepository

type ClientRepository interface {
	Get(ctx context.Context, id string) (Client, error)
	Add(ctx context.Context, client Client) error
	Delete(ctx context.Context, id string) error
}

ClientRepository allows to get/save current state of user to mysql storage

type Token

type Token interface {
	GetID() string
	GetClientID() string
	GetUserID() string
	GetAccess() string
	GetRefresh() string
	GetScope() string
	GetCode() string
	GetData() json.RawMessage
}

Token the token persistence model interface

type TokenRepository

type TokenRepository interface {
	Get(ctx context.Context, id string) (Token, error)
	GetByCode(ctx context.Context, code string) (Token, error)
	GetByAccess(ctx context.Context, access string) (Token, error)
	GetByRefresh(ctx context.Context, refresh string) (Token, error)
	Add(ctx context.Context, token Token) error
	Delete(ctx context.Context, id string) error
}

TokenRepository allows to get/save current state of token to mysql storage

type User

type User interface {
	GetID() string
	GetEmail() string
}

User the user persistence model interface

type UserRepository

type UserRepository interface {
	Get(ctx context.Context, id string) (User, error)
}

UserRepository allows to get/save current state of user to mysql storage

Directories

Path Synopsis
mysql Package mysql holds view model repositories Package mysql holds view model repositories Package mysql holds view model repositories Package mysql holds view model repositories Package mysql holds view model repositories Package mysql holds view model repositories