migration

package
v1.0.27 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// KeyAuthentication const
	KeyAuthentication = "key_authentication"

	// BasicAuthentication const
	BasicAuthentication = "basic_authentication"

	// OAuthAuthentication const
	OAuthAuthentication = "oauth_authentication"

	// AnyAuthentication const
	AnyAuthentication = "any_authentication"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthMethod

type AuthMethod struct {
	gorm.Model

	Name        string `json:"name"`
	Description string `json:"description"`
	Type        string `json:"type"`
	Endpoints   string `json:"endpoints"`
}

AuthMethod struct

func (*AuthMethod) ConvertToJSON

func (a *AuthMethod) ConvertToJSON() (string, error)

ConvertToJSON convert object to json

func (*AuthMethod) LoadFromJSON

func (a *AuthMethod) LoadFromJSON(data []byte) error

LoadFromJSON update object from json

type BasicAuthData

type BasicAuthData struct {
	gorm.Model

	Name     string `json:"name"`
	Username string `json:"username"`
	Password string `json:"password"`
	Meta     string `json:"meta"`

	AuthMethodID int        `json:"authMethodID"`
	AuthMethod   AuthMethod `json:"authMethod" gorm:"foreignKey:AuthMethodID,constraint:OnUpdate:CASCADE,OnDelete:CASCADE;"`
}

BasicAuthData struct

func (*BasicAuthData) ConvertToJSON

func (b *BasicAuthData) ConvertToJSON() (string, error)

ConvertToJSON convert object to json

func (*BasicAuthData) LoadFromJSON

func (b *BasicAuthData) LoadFromJSON(data []byte) error

LoadFromJSON update object from json

type KeyBasedAuthData

type KeyBasedAuthData struct {
	gorm.Model

	Name   string `json:"name"`
	APIKey string `json:"apiKey"`
	Meta   string `json:"meta"`

	AuthMethodID int        `json:"authMethodID"`
	AuthMethod   AuthMethod `json:"authMethod" gorm:"foreignKey:AuthMethodID,constraint:OnUpdate:CASCADE,OnDelete:CASCADE;"`
}

KeyBasedAuthData struct

func (*KeyBasedAuthData) ConvertToJSON

func (k *KeyBasedAuthData) ConvertToJSON() (string, error)

ConvertToJSON convert object to json

func (*KeyBasedAuthData) LoadFromJSON

func (k *KeyBasedAuthData) LoadFromJSON(data []byte) error

LoadFromJSON update object from json

type OAuthAccessData

type OAuthAccessData struct {
	gorm.Model

	AccessToken string    `json:"accessToken"`
	Meta        string    `json:"meta"`
	ExpireAt    time.Time `json:"expireAt"`

	OAuthDataID int       `json:"oauthDataID"`
	OAuthData   OAuthData `json:"oauthData" gorm:"foreignKey:OAuthDataID,constraint:OnUpdate:CASCADE,OnDelete:CASCADE;"`
}

OAuthAccessData struct

func (*OAuthAccessData) ConvertToJSON

func (b *OAuthAccessData) ConvertToJSON() (string, error)

ConvertToJSON convert object to json

func (*OAuthAccessData) LoadFromJSON

func (b *OAuthAccessData) LoadFromJSON(data []byte) error

LoadFromJSON update object from json

type OAuthData

type OAuthData struct {
	gorm.Model

	Name         string `json:"name"`
	ClientID     string `json:"clientID"`
	ClientSecret string `json:"clientSecret"`
	Meta         string `json:"meta"`

	AuthMethodID int        `json:"authMethodID"`
	AuthMethod   AuthMethod `json:"authMethod" gorm:"foreignKey:AuthMethodID,constraint:OnUpdate:CASCADE,OnDelete:CASCADE;"`
}

OAuthData struct

func (*OAuthData) ConvertToJSON

func (b *OAuthData) ConvertToJSON() (string, error)

ConvertToJSON convert object to json

func (*OAuthData) LoadFromJSON

func (b *OAuthData) LoadFromJSON(data []byte) error

LoadFromJSON update object from json

type Option

type Option struct {
	gorm.Model

	Key   string `json:"key"`
	Value string `json:"value"`
}

Option struct

func (*Option) ConvertToJSON

func (o *Option) ConvertToJSON() (string, error)

ConvertToJSON convert object to json

func (*Option) LoadFromJSON

func (o *Option) LoadFromJSON(data []byte) error

LoadFromJSON update object from json

Jump to

Keyboard shortcuts

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