go-api-boilerplate: github.com/vardius/go-api-boilerplate/cmd/auth/internal/infrastructure/persistence/mysql Index | Files

package mysql

import "github.com/vardius/go-api-boilerplate/cmd/auth/internal/infrastructure/persistence/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

Index

Package Files

client_model.go client_repository.go token_model.go token_repository.go user_model.go user_repository.go

func NewClientRepository Uses

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

NewClientRepository returns mysql view model repository for client

func NewTokenRepository Uses

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

NewTokenRepository returns mysql view model repository for token

func NewUserRepository Uses

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

NewUserRepository returns mysql view model repository for user

type Client Uses

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 Uses

func (c Client) GetData() json.RawMessage

GetData client data

func (Client) GetDomain Uses

func (c Client) GetDomain() string

GetDomain client domain

func (Client) GetID Uses

func (c Client) GetID() string

GetID client id

func (Client) GetSecret Uses

func (c Client) GetSecret() string

GetSecret client domain

func (Client) GetUserID Uses

func (c Client) GetUserID() string

GetUserID user id

type Token Uses

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 Uses

func (t Token) GetAccess() string

GetAccess access Token

func (Token) GetClientID Uses

func (t Token) GetClientID() string

GetClientID the client id

func (Token) GetCode Uses

func (t Token) GetCode() string

GetCode authorization code

func (Token) GetData Uses

func (t Token) GetData() json.RawMessage

GetData token data

func (Token) GetID Uses

func (t Token) GetID() string

GetID the id

func (Token) GetRefresh Uses

func (t Token) GetRefresh() string

GetRefresh refresh Token

func (Token) GetScope Uses

func (t Token) GetScope() string

GetScope get scope of authorization

func (Token) GetUserID Uses

func (t Token) GetUserID() string

GetUserID the user id

type User Uses

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

User model

func (User) GetEmail Uses

func (u User) GetEmail() string

GetEmail the email

func (User) GetID Uses

func (u User) GetID() string

GetID the id

Package mysql imports 8 packages (graph) and is imported by 1 packages. Updated 2020-08-04. Refresh now. Tools for package owners.