models

package
v11.1.4-modfix Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2024 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DB = iota
	System
)

Variables

This section is empty.

Functions

This section is empty.

Types

type SSOSettings

type SSOSettings struct {
	ID        string         `xorm:"id pk" json:"id"`
	Provider  string         `xorm:"provider" json:"provider"`
	Settings  map[string]any `xorm:"settings" json:"settings"`
	Created   time.Time      `xorm:"created" json:"-"`
	Updated   time.Time      `xorm:"updated" json:"-"`
	IsDeleted bool           `xorm:"is_deleted" json:"-"`
	Source    SettingsSource `xorm:"-" json:"source"`
}

func (SSOSettings) MarshalJSON

func (s SSOSettings) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface and converts the s.Settings from map[string]any in snake_case to map[string]any in camelCase

func (SSOSettings) TableName

func (s SSOSettings) TableName() string

TableName returns the table name (needed for Xorm)

func (*SSOSettings) UnmarshalJSON

func (s *SSOSettings) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface and converts the settings from map[string]any camelCase to map[string]interface{} snake_case

type SettingsSource

type SettingsSource int

func (SettingsSource) MarshalJSON

func (s SettingsSource) MarshalJSON() ([]byte, error)

func (*SettingsSource) UnmarshalJSON

func (s *SettingsSource) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

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