mysql

package
v0.0.0-...-8450a52 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OauthAccessGrant

type OauthAccessGrant struct{}

OauthAccessGrant an interface to access oauth_access_grants table

func NewOauthAccessGrant

func NewOauthAccessGrant() *OauthAccessGrant

NewOauthAccessGrant create new OauthAccessGrant interface

func (*OauthAccessGrant) Create

Create new record

func (*OauthAccessGrant) One

One selecting one record from database using id

func (*OauthAccessGrant) OneByCode

OneByCode selecting one record from database using code

func (*OauthAccessGrant) Revoke

func (*OauthAccessGrant) Revoke(ktx kontext.Context, code string, tx db.TX) exception.Exception

Revoke fill revoked_at of oauth_access_grants row

type OauthAccessToken

type OauthAccessToken struct{}

OauthAccessToken handle all database operation to oauth_access_tokens

func NewOauthAccessToken

func NewOauthAccessToken() *OauthAccessToken

NewOauthAccessToken create new OauthAccessTokens struct

func (*OauthAccessToken) Create

Create new oauth access token

func (*OauthAccessToken) One

One get oauth access token data by id

func (*OauthAccessToken) OneByToken

OneByToken get oauth access token data by token string

func (*OauthAccessToken) Revoke

func (*OauthAccessToken) Revoke(ktx kontext.Context, token string, tx db.TX) exception.Exception

Revoke oauth access token

type OauthApplication

type OauthApplication struct {
}

OauthApplication handle all database operation of `oauth_applications` table

func NewOauthApplication

func NewOauthApplication() *OauthApplication

NewOauthApplication create new OauthApplication struct with db.DB

func (*OauthApplication) Count

Count all oauth_applications data

func (*OauthApplication) Create

Create new oauth_applications data

func (*OauthApplication) One

One get one oauth_applications by id

func (*OauthApplication) OneByUIDandSecret

func (*OauthApplication) OneByUIDandSecret(ktx kontext.Context, clientUID, clientSecret string, tx db.TX) (entity.OauthApplication, exception.Exception)

OneByUIDandSecret get one oauth_applications by client uid and client secret

func (*OauthApplication) Paginate

func (*OauthApplication) Paginate(ktx kontext.Context, offset, limit int, tx db.TX) ([]entity.OauthApplication, exception.Exception)

Paginate oauth_applications data

func (*OauthApplication) Update

Update oauth_applications data

type OauthRefreshToken

type OauthRefreshToken struct{}

OauthRefreshToken is a connector to oauth_refresh_tokens table

func NewOauthRefreshToken

func NewOauthRefreshToken() *OauthRefreshToken

NewOauthRefreshToken create new OauthRefreshToken struct

func (*OauthRefreshToken) Create

Create new oauth refresh token based on oauth refresh token insertable

func (*OauthRefreshToken) One

One selecting one oauth refresh token data

func (*OauthRefreshToken) OneByToken

OneByToken selecting one oauth refresh token data based on given token data

func (*OauthRefreshToken) Revoke

func (*OauthRefreshToken) Revoke(ktx kontext.Context, token string, tx db.TX) exception.Exception

Revoke given token

Jump to

Keyboard shortcuts

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