mysql

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClientRepository

func NewClientRepository(db *sql.DB) persistence.ClientRepository

NewClientRepository returns mysql view model repository for client

func NewTokenRepository

func NewTokenRepository(db *sql.DB) persistence.TokenRepository

NewTokenRepository returns mysql view model repository for token

func NewUserRepository

func NewUserRepository(db *sql.DB) persistence.UserRepository

NewUserRepository returns mysql view model repository for user

Types

type Client

type Client struct {
	ID     string          `json:"id"`
	UserID string          `json:"userId"`
	Secret string          `json:"secret"`
	Domain string          `json:"domain"`
	Data   json.RawMessage `json:"data"`
}

Client model

func (Client) GetData

func (c Client) GetData() json.RawMessage

GetData client data

func (Client) GetDomain

func (c Client) GetDomain() string

GetDomain client domain

func (Client) GetID

func (c Client) GetID() string

GetID client id

func (Client) GetSecret

func (c Client) GetSecret() string

GetSecret client domain

func (Client) GetUserID

func (c Client) GetUserID() string

GetUserID user id

type Token

type Token struct {
	ID       string           `json:"id"`
	ClientID string           `json:"clientId"`
	UserID   string           `json:"userId"`
	Scope    string           `json:"scope"`
	Access   string           `json:"access"`
	Refresh  string           `json:"refresh"`
	Code     mysql.NullString `json:"code"`
	Data     json.RawMessage  `json:"data"`
}

Token model

func (Token) GetAccess

func (t Token) GetAccess() string

GetAccess access Token

func (Token) GetClientID

func (t Token) GetClientID() string

GetClientID the client id

func (Token) GetCode

func (t Token) GetCode() string

GetCode authorization code

func (Token) GetData

func (t Token) GetData() json.RawMessage

GetData token data

func (Token) GetID

func (t Token) GetID() string

GetID the id

func (Token) GetRefresh

func (t Token) GetRefresh() string

GetRefresh refresh Token

func (Token) GetScope

func (t Token) GetScope() string

GetScope get scope of authorization

func (Token) GetUserID

func (t Token) GetUserID() string

GetUserID the user id

type User

type User struct {
	ID    string `json:"id"`
	Email string `json:"emailAddress"`
}

User model

func (User) GetEmail

func (u User) GetEmail() string

GetEmail the email

func (User) GetID

func (u User) GetID() string

GetID the id

Jump to

Keyboard shortcuts

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