models

package
v0.0.0-...-6cdb919 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Token

type Token struct {
	ID uint `gorm:"primarykey"`

	// grant client info
	ClientID    string `gorm:"column:client_id"`
	RedirectURI string `gorm:"column:redirect_uri"`
	State       string `gorm:"column:state"`

	// token basic info
	Name string `gorm:"column:name"`
	// Code authorize_code/access_token/refresh_token
	Code      string        `gorm:"column:code"`
	CreatedAt time.Time     `gorm:"column:created_at"`
	CreatedBy uint          `gorm:"column:created_by"`
	ExpiresIn time.Duration `gorm:"column:expires_in"`
	Scope     string        `gorm:"column:scope"`

	// access token id when code type is refresh_token
	RefID uint `gorm:"column:ref_id"`

	UserID uint `gorm:"column:user_id"`
}

Jump to

Keyboard shortcuts

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