Documentation
¶
Index ¶
- type OauthAccessGrant
- func (*OauthAccessGrant) Create(ktx kontext.Context, data entity.OauthAccessGrantInsertable, tx db.TX) (int, exception.Exception)
- func (*OauthAccessGrant) One(ktx kontext.Context, ID int, tx db.TX) (entity.OauthAccessGrant, exception.Exception)
- func (*OauthAccessGrant) OneByCode(ktx kontext.Context, code string, tx db.TX) (entity.OauthAccessGrant, exception.Exception)
- func (*OauthAccessGrant) Revoke(ktx kontext.Context, code string, tx db.TX) exception.Exception
- type OauthAccessToken
- func (*OauthAccessToken) Create(ktx kontext.Context, data entity.OauthAccessTokenInsertable, tx db.TX) (int, exception.Exception)
- func (*OauthAccessToken) One(ktx kontext.Context, ID int, tx db.TX) (entity.OauthAccessToken, exception.Exception)
- func (*OauthAccessToken) OneByToken(ktx kontext.Context, token string, tx db.TX) (entity.OauthAccessToken, exception.Exception)
- func (*OauthAccessToken) Revoke(ktx kontext.Context, token string, tx db.TX) exception.Exception
- type OauthApplication
- func (*OauthApplication) Count(ktx kontext.Context, tx db.TX) (int, exception.Exception)
- func (*OauthApplication) Create(ktx kontext.Context, data entity.OauthApplicationInsertable, tx db.TX) (int, exception.Exception)
- func (*OauthApplication) One(ktx kontext.Context, ID int, tx db.TX) (entity.OauthApplication, exception.Exception)
- func (*OauthApplication) OneByUIDandSecret(ktx kontext.Context, clientUID, clientSecret string, tx db.TX) (entity.OauthApplication, exception.Exception)
- func (*OauthApplication) Paginate(ktx kontext.Context, offset, limit int, tx db.TX) ([]entity.OauthApplication, exception.Exception)
- func (*OauthApplication) Update(ktx kontext.Context, ID int, data entity.OauthApplicationUpdateable, tx db.TX) exception.Exception
- type OauthRefreshToken
- func (*OauthRefreshToken) Create(ktx kontext.Context, data entity.OauthRefreshTokenInsertable, tx db.TX) (int, exception.Exception)
- func (*OauthRefreshToken) One(ktx kontext.Context, ID int, tx db.TX) (entity.OauthRefreshToken, exception.Exception)
- func (*OauthRefreshToken) OneByToken(ktx kontext.Context, token string, tx db.TX) (entity.OauthRefreshToken, exception.Exception)
- func (*OauthRefreshToken) Revoke(ktx kontext.Context, token string, tx db.TX) exception.Exception
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 ¶
func (*OauthAccessGrant) Create(ktx kontext.Context, data entity.OauthAccessGrantInsertable, tx db.TX) (int, exception.Exception)
Create new record
func (*OauthAccessGrant) One ¶
func (*OauthAccessGrant) One(ktx kontext.Context, ID int, tx db.TX) (entity.OauthAccessGrant, exception.Exception)
One selecting one record from database using id
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 ¶
func (*OauthAccessToken) Create(ktx kontext.Context, data entity.OauthAccessTokenInsertable, tx db.TX) (int, exception.Exception)
Create new oauth access token
func (*OauthAccessToken) One ¶
func (*OauthAccessToken) One(ktx kontext.Context, ID int, tx db.TX) (entity.OauthAccessToken, exception.Exception)
One get oauth access token data by id
func (*OauthAccessToken) OneByToken ¶
func (*OauthAccessToken) OneByToken(ktx kontext.Context, token string, tx db.TX) (entity.OauthAccessToken, exception.Exception)
OneByToken get oauth access token data by token string
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) Create ¶
func (*OauthApplication) Create(ktx kontext.Context, data entity.OauthApplicationInsertable, tx db.TX) (int, exception.Exception)
Create new oauth_applications data
func (*OauthApplication) One ¶
func (*OauthApplication) One(ktx kontext.Context, ID int, tx db.TX) (entity.OauthApplication, exception.Exception)
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
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 ¶
func (*OauthRefreshToken) Create(ktx kontext.Context, data entity.OauthRefreshTokenInsertable, tx db.TX) (int, exception.Exception)
Create new oauth refresh token based on oauth refresh token insertable
func (*OauthRefreshToken) One ¶
func (*OauthRefreshToken) One(ktx kontext.Context, ID int, tx db.TX) (entity.OauthRefreshToken, exception.Exception)
One selecting one oauth refresh token data
func (*OauthRefreshToken) OneByToken ¶
func (*OauthRefreshToken) OneByToken(ktx kontext.Context, token string, tx db.TX) (entity.OauthRefreshToken, exception.Exception)
OneByToken selecting one oauth refresh token data based on given token data