oauth2gorm

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2023 License: MIT Imports: 8 Imported by: 0

README

go-oauth2-gorm

Credits

Based on https://github.com/go-oauth2/mysql/

Feature

Support gorm v2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientStore

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

func NewClientStoreWithDB

func NewClientStoreWithDB(tableName string, db *gorm.DB) *ClientStore

func (*ClientStore) Create

func (s *ClientStore) Create(ctx context.Context, info oauth2.ClientInfo) error

func (*ClientStore) GetByID

func (s *ClientStore) GetByID(ctx context.Context, id string) (oauth2.ClientInfo, error)

type ClientStoreItem

type ClientStoreItem struct {
	ID        string
	Secret    string `gorm:"type:varchar(512)"`
	Domain    string `gorm:"type:varchar(512)"`
	Data      string `gorm:"type:text"`
	CreatedAt time.Time
	UpdatedAt time.Time
	DeletedAt gorm.DeletedAt `gorm:"index"`
}

Jump to

Keyboard shortcuts

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