db

package
v0.0.0-...-e3f99e4 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Ctx = State{}

Functions

This section is empty.

Types

type State

type State struct {
	// contains filtered or unexported fields
}

func (*State) AddUser

func (s *State) AddUser(i id.ID, username, bcryptPassword string) error

func (*State) Exec

func (s *State) Exec(query string, args ...any) (sql.Result, error)

func (*State) GetAuthClient

func (s *State) GetAuthClient(clientId string) (*m.AuthClient, error)

query m.AuthClient by client_id

func (*State) GetUserInfo

func (s *State) GetUserInfo(id id.ID) (u m.UserInfo, err error)

func (*State) GetUserPassword

func (s *State) GetUserPassword(username string) (u m.UserPassword, err error)

func (*State) Open

func (s *State) Open(url string) error

func (*State) Query

func (s *State) Query(query string, args ...any) (*sql.Rows, error)

func (*State) QueryCode

func (s *State) QueryCode(clientid, codestr string) (code *m.AuthCode, err error)

func (*State) QueryRefreshToken

func (s *State) QueryRefreshToken(clientId, refreshToken string) (ref []m.RefreshToken, err error)

func (*State) QueryRow

func (s *State) QueryRow(query string, args ...any) *sql.Row

func (*State) SaveRefreshToken

func (s *State) SaveRefreshToken(ref *m.RefreshToken) error

func (*State) StoreCode

func (s *State) StoreCode(code *m.AuthCode) error

Jump to

Keyboard shortcuts

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