models

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: May 10, 2024 License: Apache-2.0 Imports: 35 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AppMeta_GrantMode_name = map[int32]string{
	0: "manual",
	1: "full",
}
View Source
var AppMeta_GrantMode_value = map[string]int32{
	"manual": 0,
	"full":   1,
}
View Source
var AppMeta_GrantType_name = map[int32]string{
	0:  "none",
	1:  "authorization_code",
	2:  "implicit",
	4:  "password",
	8:  "client_credentials",
	16: "proxy",
	32: "oidc",
	64: "radius",
}
View Source
var AppMeta_GrantType_value = map[string]int32{
	"none":               0,
	"authorization_code": 1,
	"implicit":           2,
	"password":           4,
	"client_credentials": 8,
	"proxy":              16,
	"oidc":               32,
	"radius":             64,
}
View Source
var AppMeta_JWTSignatureMethod_name = map[int32]string{
	0: "default",
	1: "HS256",
	2: "HS384",
	3: "HS512",
	4: "RS256",
	5: "RS384",
	6: "RS512",
	7: "ES256",
	8: "ES384",
	9: "ES512",
}
View Source
var AppMeta_JWTSignatureMethod_value = map[string]int32{
	"default": 0,
	"HS256":   1,
	"HS384":   2,
	"HS512":   3,
	"RS256":   4,
	"RS384":   5,
	"RS512":   6,
	"ES256":   7,
	"ES384":   8,
	"ES512":   9,
}
View Source
var AppMeta_Status_name = map[int32]string{
	0: "unknown",
	1: "normal",
	2: "disable",
}
View Source
var AppMeta_Status_value = map[string]int32{
	"unknown": 0,
	"normal":  1,
	"disable": 2,
}
View Source
var AuthMeta_Method_name = map[int32]string{
	0: "basic",
	1: "signature",
	2: "token",
	3: "token_signature",
}
View Source
var AuthMeta_Method_value = map[string]int32{
	"basic":           0,
	"signature":       1,
	"token":           2,
	"token_signature": 3,
}
View Source
var FieldType_name = map[int32]string{
	0:  "text",
	2:  "textarea",
	3:  "digit",
	4:  "digitRange",
	5:  "checkbox",
	6:  "radio",
	7:  "switch",
	8:  "select",
	9:  "multiSelect",
	10: "timeRange",
	11: "date",
	12: "dateRange",
	13: "dateTime",
	14: "dateTimeRange",
}
View Source
var FieldType_value = map[string]int32{
	"text":          0,
	"textarea":      2,
	"digit":         3,
	"digitRange":    4,
	"checkbox":      5,
	"radio":         6,
	"switch":        7,
	"select":        8,
	"multiSelect":   9,
	"timeRange":     10,
	"date":          11,
	"dateRange":     12,
	"dateTime":      13,
	"dateTimeRange": 14,
}
View Source
var PageStatus_name = map[int32]string{
	0: "all",
	1: "disabled",
	2: "enabled",
}
View Source
var PageStatus_value = map[string]int32{
	"all":      0,
	"disabled": 1,
	"enabled":  2,
}
View Source
var RoleMeta_Type_name = map[int32]string{
	0: "user",
	1: "system",
}
View Source
var RoleMeta_Type_value = map[string]int32{
	"user":   0,
	"system": 1,
}
View Source
var UserMeta_UserStatus_name = map[int32]string{
	0: "normal",
	1: "disabled",
	2: "user_inactive",
	4: "password_expired",
}
View Source
var UserMeta_UserStatus_value = map[string]int32{
	"normal":           0,
	"disabled":         1,
	"user_inactive":    2,
	"password_expired": 4,
}

Functions

This section is empty.

Types

type App

type App struct {
	Model       `protobuf:"bytes,1,opt,name=model,proto3,embedded=model" json:",omitempty"`
	Name        string            `protobuf:"bytes,2,opt,name=name,proto3" json:"name" gorm:"type:varchar(50);not null;unique"`
	Description string            `protobuf:"bytes,3,opt,name=description,proto3" json:"description" gorm:"type:varchar(200)"`
	Avatar      string            `protobuf:"bytes,4,opt,name=avatar,proto3" json:"avatar" gorm:"type:varchar(128)"`
	GrantType   AppMeta_GrantType `` /* 163-byte string literal not displayed */
	GrantMode   AppMeta_GrantMode `` /* 163-byte string literal not displayed */
	Status      AppMeta_Status    `` /* 138-byte string literal not displayed */
	Users       Users             `protobuf:"bytes,8,opt,name=users,proto3,customtype=Users" json:"users,omitempty" gorm:"-"`
	Roles       AppRoles          `protobuf:"bytes,9,opt,name=roles,proto3,customtype=AppRoles" json:"roles,omitempty" gorm:"-"`
	Proxy       *AppProxy         `protobuf:"bytes,10,opt,name=proxy,proto3" json:"proxy,omitempty" gorm:"-"`
	Url         string            `protobuf:"bytes,11,opt,name=url,proto3" json:"url" gorm:"type:varchar(200)"`
	DisplayName string            `protobuf:"bytes,12,opt,name=display_name,json=displayName,proto3" json:"displayName,omitempty" gorm:"type:varchar(128)"`
	Role        string            `protobuf:"bytes,13,opt,name=role,proto3" json:"role,omitempty" gorm:"-"`
	RoleId      string            `protobuf:"bytes,14,opt,name=role_id,json=roleId,proto3" json:"roleId,omitempty" gorm:"-"`
	I18N        *AppI18NOptions   `protobuf:"bytes,15,opt,name=i18n,proto3" json:"i18n" gorm:"-"`
	OAuth2      *AppOAuth2        `protobuf:"bytes,16,opt,name=oAuth2,proto3" json:"oAuth2" gorm:"-"`
}

func (*App) Descriptor

func (*App) Descriptor() ([]byte, []int)

func (*App) GetAvatar

func (m *App) GetAvatar() string

func (*App) GetDescription

func (m *App) GetDescription() string

func (*App) GetDisplayName

func (m *App) GetDisplayName() string

func (*App) GetGrantMode

func (m *App) GetGrantMode() AppMeta_GrantMode

func (*App) GetGrantType

func (m *App) GetGrantType() AppMeta_GrantType

func (*App) GetI18N

func (m *App) GetI18N() *AppI18NOptions

func (*App) GetJWTIssuer added in v1.4.2

func (m *App) GetJWTIssuer(ctx context.Context) jwtutils.JWTIssuer

func (*App) GetName

func (m *App) GetName() string

func (*App) GetOAuth2 added in v1.4.0

func (m *App) GetOAuth2() *AppOAuth2

func (*App) GetProxy

func (m *App) GetProxy() *AppProxy

func (*App) GetRole

func (m *App) GetRole() string

func (*App) GetRoleId

func (m *App) GetRoleId() string

func (*App) GetStatus

func (m *App) GetStatus() AppMeta_Status

func (*App) GetUrl

func (m *App) GetUrl() string

func (*App) ProtoMessage

func (*App) ProtoMessage()

func (*App) Reset

func (m *App) Reset()

func (*App) String

func (m *App) String() string

func (*App) XXX_DiscardUnknown

func (m *App) XXX_DiscardUnknown()

func (*App) XXX_Marshal

func (m *App) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*App) XXX_Merge

func (m *App) XXX_Merge(src proto.Message)

func (*App) XXX_Size

func (m *App) XXX_Size() int

func (*App) XXX_Unmarshal

func (m *App) XXX_Unmarshal(b []byte) error

type AppI18NOptions

type AppI18NOptions struct {
	DisplayName          map[string]string `` /* 181-byte string literal not displayed */
	Description          map[string]string `` /* 163-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

func (*AppI18NOptions) Descriptor

func (*AppI18NOptions) Descriptor() ([]byte, []int)

func (*AppI18NOptions) GetDescription

func (m *AppI18NOptions) GetDescription() map[string]string

func (*AppI18NOptions) GetDisplayName

func (m *AppI18NOptions) GetDisplayName() map[string]string

func (*AppI18NOptions) ProtoMessage

func (*AppI18NOptions) ProtoMessage()

func (*AppI18NOptions) Reset

func (m *AppI18NOptions) Reset()

func (*AppI18NOptions) String

func (m *AppI18NOptions) String() string

func (*AppI18NOptions) XXX_DiscardUnknown

func (m *AppI18NOptions) XXX_DiscardUnknown()

func (*AppI18NOptions) XXX_Marshal

func (m *AppI18NOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AppI18NOptions) XXX_Merge

func (m *AppI18NOptions) XXX_Merge(src proto.Message)

func (*AppI18NOptions) XXX_Size

func (m *AppI18NOptions) XXX_Size() int

func (*AppI18NOptions) XXX_Unmarshal

func (m *AppI18NOptions) XXX_Unmarshal(b []byte) error

type AppKey

type AppKey struct {
	Model
	Name       string `gorm:"type:varchar(50)" json:"name"`
	AppId      string `gorm:"type:char(36);" json:"appId"`
	Key        string `gorm:"type:varchar(50);" json:"key"`
	Secret     string `gorm:"type:varchar(50);" json:"secret"`
	PrivateKey string `gorm:"-" json:"privateKey"`
}

type AppMeta

type AppMeta struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*AppMeta) Descriptor

func (*AppMeta) Descriptor() ([]byte, []int)

func (*AppMeta) ProtoMessage

func (*AppMeta) ProtoMessage()

func (*AppMeta) Reset

func (m *AppMeta) Reset()

func (*AppMeta) String

func (m *AppMeta) String() string

func (*AppMeta) XXX_DiscardUnknown

func (m *AppMeta) XXX_DiscardUnknown()

func (*AppMeta) XXX_Marshal

func (m *AppMeta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AppMeta) XXX_Merge

func (m *AppMeta) XXX_Merge(src proto.Message)

func (*AppMeta) XXX_Size

func (m *AppMeta) XXX_Size() int

func (*AppMeta) XXX_Unmarshal

func (m *AppMeta) XXX_Unmarshal(b []byte) error

type AppMeta_GrantMode

type AppMeta_GrantMode int32

@sync-to-public:public/src/services/idas/enums.ts:GrantMode

const (
	AppMeta_manual AppMeta_GrantMode = 0
	AppMeta_full   AppMeta_GrantMode = 1
)

func (AppMeta_GrantMode) EnumDescriptor

func (AppMeta_GrantMode) EnumDescriptor() ([]byte, []int)

func (AppMeta_GrantMode) String

func (x AppMeta_GrantMode) String() string

type AppMeta_GrantType

type AppMeta_GrantType int32

@sync-to-public:public/src/services/idas/enums.ts:GrantType

const (
	AppMeta_none               AppMeta_GrantType = 0
	AppMeta_authorization_code AppMeta_GrantType = 1
	AppMeta_implicit           AppMeta_GrantType = 2
	AppMeta_password           AppMeta_GrantType = 4
	AppMeta_client_credentials AppMeta_GrantType = 8
	AppMeta_proxy              AppMeta_GrantType = 16
	AppMeta_oidc               AppMeta_GrantType = 32
	AppMeta_radius             AppMeta_GrantType = 64
)

func NewGrantType

func NewGrantType(gs ...AppMeta_GrantType) AppMeta_GrantType

func (AppMeta_GrantType) EnumDescriptor

func (AppMeta_GrantType) EnumDescriptor() ([]byte, []int)

func (AppMeta_GrantType) MarshalJSON

func (x AppMeta_GrantType) MarshalJSON() ([]byte, error)

func (AppMeta_GrantType) Name added in v1.4.0

func (x AppMeta_GrantType) Name() []string

func (AppMeta_GrantType) String

func (x AppMeta_GrantType) String() string

type AppMeta_JWTSignatureMethod added in v1.4.0

type AppMeta_JWTSignatureMethod int32

@sync-to-public:public/src/services/idas/enums.ts:JWTSignatureMethod

const (
	AppMeta_default AppMeta_JWTSignatureMethod = 0
	AppMeta_HS256   AppMeta_JWTSignatureMethod = 1
	AppMeta_HS384   AppMeta_JWTSignatureMethod = 2
	AppMeta_HS512   AppMeta_JWTSignatureMethod = 3
	AppMeta_RS256   AppMeta_JWTSignatureMethod = 4
	AppMeta_RS384   AppMeta_JWTSignatureMethod = 5
	AppMeta_RS512   AppMeta_JWTSignatureMethod = 6
	AppMeta_ES256   AppMeta_JWTSignatureMethod = 7
	AppMeta_ES384   AppMeta_JWTSignatureMethod = 8
	AppMeta_ES512   AppMeta_JWTSignatureMethod = 9
)

func (AppMeta_JWTSignatureMethod) EnumDescriptor added in v1.4.0

func (AppMeta_JWTSignatureMethod) EnumDescriptor() ([]byte, []int)

func (AppMeta_JWTSignatureMethod) String added in v1.4.0

type AppMeta_Status

type AppMeta_Status int32

@sync-to-public:public/src/services/idas/enums.ts:AppStatus

const (
	AppMeta_unknown AppMeta_Status = 0
	AppMeta_normal  AppMeta_Status = 1
	AppMeta_disable AppMeta_Status = 2
)

func (AppMeta_Status) EnumDescriptor

func (AppMeta_Status) EnumDescriptor() ([]byte, []int)

func (AppMeta_Status) String

func (x AppMeta_Status) String() string

type AppOAuth2 added in v1.4.0

type AppOAuth2 struct {
	AppId                 string                                   `protobuf:"bytes,2,opt,name=app_id,json=appId,proto3" json:"-" gorm:"type:char(36);unique;not null"`
	AuthorizedRedirectUrl AuthorizedRedirectUrls                   `` /* 160-byte string literal not displayed */
	JwtSignatureMethod    AppMeta_JWTSignatureMethod               `` /* 158-byte string literal not displayed */
	JwtSignatureKey       *github_com_MicroOps_cn_fuck_safe.String `` /* 157-byte string literal not displayed */
}

func (*AppOAuth2) Descriptor added in v1.4.0

func (*AppOAuth2) Descriptor() ([]byte, []int)

func (*AppOAuth2) GetAppId added in v1.4.0

func (m *AppOAuth2) GetAppId() string

func (AppOAuth2) GetJWTIssuer added in v1.4.2

func (m AppOAuth2) GetJWTIssuer(ctx context.Context) jwtutils.JWTIssuer

func (*AppOAuth2) GetJwtSignatureMethod added in v1.4.0

func (m *AppOAuth2) GetJwtSignatureMethod() AppMeta_JWTSignatureMethod

func (*AppOAuth2) ProtoMessage added in v1.4.0

func (*AppOAuth2) ProtoMessage()

func (*AppOAuth2) Reset added in v1.4.0

func (m *AppOAuth2) Reset()

func (*AppOAuth2) String added in v1.4.0

func (m *AppOAuth2) String() string

func (AppOAuth2) TableName added in v1.4.0

func (m AppOAuth2) TableName() string

func (*AppOAuth2) XXX_DiscardUnknown added in v1.4.0

func (m *AppOAuth2) XXX_DiscardUnknown()

func (*AppOAuth2) XXX_Marshal added in v1.4.0

func (m *AppOAuth2) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AppOAuth2) XXX_Merge added in v1.4.0

func (m *AppOAuth2) XXX_Merge(src proto.Message)

func (*AppOAuth2) XXX_Size added in v1.4.0

func (m *AppOAuth2) XXX_Size() int

func (*AppOAuth2) XXX_Unmarshal added in v1.4.0

func (m *AppOAuth2) XXX_Unmarshal(b []byte) error

type AppProxy

type AppProxy struct {
	Model                 `protobuf:"bytes,1,opt,name=model,proto3,embedded=model" json:",omitempty"`
	AppId                 string                `protobuf:"bytes,2,opt,name=app_id,json=appId,proto3" json:"appId" gorm:"type:char(36);unique;not null"`
	Domain                string                `protobuf:"bytes,3,opt,name=domain,proto3" json:"domain" gorm:"type:varchar(50);" valid:"required"`
	Upstream              string                `protobuf:"bytes,4,opt,name=upstream,proto3" json:"upstream" gorm:"type:varchar(50);" valid:"required"`
	Urls                  AppProxyUrls          `protobuf:"bytes,5,opt,name=urls,proto3,customtype=AppProxyUrls" json:"urls" gorm:"foreignKey:AppProxyId"`
	InsecureSkipVerify    bool                  `` /* 132-byte string literal not displayed */
	TransparentServerName bool                  `` /* 141-byte string literal not displayed */
	JwtProvider           bool                  `protobuf:"varint,8,opt,name=jwt_provider,json=jwtProvider,proto3" json:"jwtProvider"`
	JwtCookieName         string                `protobuf:"bytes,9,opt,name=jwt_cookie_name,json=jwtCookieName,proto3" json:"jwtCookieName"`
	JwtSecret             database_sql.RawBytes `` /* 133-byte string literal not displayed */
	JwtSecretSalt         database_sql.RawBytes `` /* 147-byte string literal not displayed */
	HstsOffload           bool                  `protobuf:"varint,11,opt,name=hsts_offload,json=hstsOffload,proto3" json:"hstsOffload"`
}

func (*AppProxy) Descriptor

func (*AppProxy) Descriptor() ([]byte, []int)

func (*AppProxy) GetAppId

func (m *AppProxy) GetAppId() string

func (*AppProxy) GetDomain

func (m *AppProxy) GetDomain() string

func (*AppProxy) GetHstsOffload

func (m *AppProxy) GetHstsOffload() bool

func (*AppProxy) GetInsecureSkipVerify

func (m *AppProxy) GetInsecureSkipVerify() bool

func (*AppProxy) GetJwtCookieName

func (m *AppProxy) GetJwtCookieName() string

func (*AppProxy) GetJwtProvider

func (m *AppProxy) GetJwtProvider() bool

func (*AppProxy) GetJwtSecret

func (c *AppProxy) GetJwtSecret() (string, error)

func (*AppProxy) GetTransparentServerName

func (m *AppProxy) GetTransparentServerName() bool

func (*AppProxy) GetUpstream

func (m *AppProxy) GetUpstream() string

func (*AppProxy) ProtoMessage

func (*AppProxy) ProtoMessage()

func (*AppProxy) Reset

func (m *AppProxy) Reset()

func (*AppProxy) SetJwtSecret

func (c *AppProxy) SetJwtSecret(secret string) (err error)

func (*AppProxy) String

func (m *AppProxy) String() string

func (*AppProxy) XXX_DiscardUnknown

func (m *AppProxy) XXX_DiscardUnknown()

func (*AppProxy) XXX_Marshal

func (m *AppProxy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AppProxy) XXX_Merge

func (m *AppProxy) XXX_Merge(src proto.Message)

func (*AppProxy) XXX_Size

func (m *AppProxy) XXX_Size() int

func (*AppProxy) XXX_Unmarshal

func (m *AppProxy) XXX_Unmarshal(b []byte) error

type AppProxyConfig

type AppProxyConfig struct {
	AppProxy
	URLRoles []AppRoleURL
}

func (*AppProxyConfig) GetId

func (c *AppProxyConfig) GetId() string

type AppProxyUrl

type AppProxyUrl struct {
	Model      `protobuf:"bytes,1,opt,name=model,proto3,embedded=model" json:",omitempty"`
	AppProxyId string `protobuf:"bytes,2,opt,name=app_proxy_id,json=appProxyId,proto3" json:"-" type:char(36);`
	Name       string `protobuf:"bytes,3,opt,name=name,proto3" json:"name" gorm:"type:varchar(50);"`
	Method     string `protobuf:"bytes,4,opt,name=method,proto3" json:"method" gorm:"type:varchar(8);"`
	Url        string `protobuf:"bytes,5,opt,name=url,proto3" json:"url" gorm:"type:varchar(50);"`
	Upstream   string `protobuf:"bytes,6,opt,name=upstream,proto3" json:"upstream,omitempty" gorm:"type:varchar(50);"`
	Index      uint32 `protobuf:"varint,9,opt,name=index,proto3" json:"index,omitempty"`
}

func (*AppProxyUrl) Descriptor

func (*AppProxyUrl) Descriptor() ([]byte, []int)

func (*AppProxyUrl) GetAppProxyId

func (m *AppProxyUrl) GetAppProxyId() string

func (*AppProxyUrl) GetIndex

func (m *AppProxyUrl) GetIndex() uint32

func (*AppProxyUrl) GetMethod

func (m *AppProxyUrl) GetMethod() string

func (*AppProxyUrl) GetName

func (m *AppProxyUrl) GetName() string

func (*AppProxyUrl) GetUpstream

func (m *AppProxyUrl) GetUpstream() string

func (*AppProxyUrl) GetUrl

func (m *AppProxyUrl) GetUrl() string

func (*AppProxyUrl) ProtoMessage

func (*AppProxyUrl) ProtoMessage()

func (*AppProxyUrl) Reset

func (m *AppProxyUrl) Reset()

func (*AppProxyUrl) String

func (m *AppProxyUrl) String() string

func (*AppProxyUrl) XXX_DiscardUnknown

func (m *AppProxyUrl) XXX_DiscardUnknown()

func (*AppProxyUrl) XXX_Marshal

func (m *AppProxyUrl) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AppProxyUrl) XXX_Merge

func (m *AppProxyUrl) XXX_Merge(src proto.Message)

func (*AppProxyUrl) XXX_Size

func (m *AppProxyUrl) XXX_Size() int

func (*AppProxyUrl) XXX_Unmarshal

func (m *AppProxyUrl) XXX_Unmarshal(b []byte) error

type AppProxyUrls

type AppProxyUrls []*AppProxyUrl

func (AppProxyUrls) Id

func (a AppProxyUrls) Id() (ids []string)

func (AppProxyUrls) Len

func (a AppProxyUrls) Len() int

func (AppProxyUrls) Less

func (a AppProxyUrls) Less(i, j int) bool

func (AppProxyUrls) Swap

func (a AppProxyUrls) Swap(i, j int)

type AppRole

type AppRole struct {
	Model     `protobuf:"bytes,1,opt,name=model,proto3,embedded=model" json:",omitempty"`
	AppId     string         `protobuf:"bytes,2,opt,name=app_id,json=appId,proto3" json:"appId" gorm:"type:char(36);not null" valid:"required"`
	Name      string         `protobuf:"bytes,3,opt,name=name,proto3" json:"name" gorm:"type:varchar(50);" valid:"required"`
	Urls      []*AppProxyUrl `protobuf:"bytes,4,rep,name=urls,proto3,customtype=*AppProxyUrl" json:"-" gorm:"many2many:app_role_url" valid:"required"`
	UrlsId    []string       `protobuf:"bytes,5,rep,name=urlsId,proto3" json:"urls" gorm:"-"`
	Users     []*User        `protobuf:"bytes,6,rep,name=users,proto3,customtype=*User" json:"users" gorm:"-" valid:"required"`
	IsDefault bool           `protobuf:"varint,7,opt,name=is_default,json=isDefault,proto3" json:"isDefault,omitempty"`
}

func (*AppRole) Descriptor

func (*AppRole) Descriptor() ([]byte, []int)

func (*AppRole) GetAppId

func (m *AppRole) GetAppId() string

func (*AppRole) GetIsDefault

func (m *AppRole) GetIsDefault() bool

func (*AppRole) GetName

func (m *AppRole) GetName() string

func (*AppRole) GetUrlsId

func (m *AppRole) GetUrlsId() []string

func (*AppRole) ProtoMessage

func (*AppRole) ProtoMessage()

func (*AppRole) Reset

func (m *AppRole) Reset()

func (*AppRole) String

func (m *AppRole) String() string

func (*AppRole) XXX_DiscardUnknown

func (m *AppRole) XXX_DiscardUnknown()

func (*AppRole) XXX_Marshal

func (m *AppRole) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AppRole) XXX_Merge

func (m *AppRole) XXX_Merge(src proto.Message)

func (*AppRole) XXX_Size

func (m *AppRole) XXX_Size() int

func (*AppRole) XXX_Unmarshal

func (m *AppRole) XXX_Unmarshal(b []byte) error

type AppRoleURL

type AppRoleURL struct {
	AppRoleId     string `json:"app_role_id"`
	AppRoleName   string `json:"app_role_name"`
	AppProxyURLId string `json:"app_proxy_url_id"`
}

type AppRoles

type AppRoles []*AppRole

func (AppRoles) GetId

func (roles AppRoles) GetId() (ids []string)

func (AppRoles) GetRole

func (roles AppRoles) GetRole(name string) *AppRole

func (AppRoles) GetRoleById

func (roles AppRoles) GetRoleById(id string) *AppRole

type AppUser

type AppUser struct {
	Model
	AppId  string `json:"appId" gorm:"type:char(36);not null;index:idx_app_user,unique"`
	UserId string `json:"userId" gorm:"type:char(36);not null;index:idx_app_user,unique"`
	RoleId string `json:"roleId" gorm:"default:'';type:char(36);not null"`
}

type AppUsers

type AppUsers []*AppUser

func (AppUsers) GetByAppId

func (s AppUsers) GetByAppId(id string) *AppUser

func (AppUsers) GetByUserId

func (s AppUsers) GetByUserId(id string) *AppUser

func (AppUsers) Id

func (s AppUsers) Id() (ids []string)

func (AppUsers) UserId

func (s AppUsers) UserId() (ids []string)

type Apps

type Apps []*App

func (Apps) GetById

func (a Apps) GetById(id string) *App

func (Apps) Id

func (a Apps) Id() []string

type AuthMeta

type AuthMeta struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*AuthMeta) Descriptor

func (*AuthMeta) Descriptor() ([]byte, []int)

func (*AuthMeta) ProtoMessage

func (*AuthMeta) ProtoMessage()

func (*AuthMeta) Reset

func (m *AuthMeta) Reset()

func (*AuthMeta) String

func (m *AuthMeta) String() string

func (*AuthMeta) XXX_DiscardUnknown

func (m *AuthMeta) XXX_DiscardUnknown()

func (*AuthMeta) XXX_Marshal

func (m *AuthMeta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AuthMeta) XXX_Merge

func (m *AuthMeta) XXX_Merge(src proto.Message)

func (*AuthMeta) XXX_Size

func (m *AuthMeta) XXX_Size() int

func (*AuthMeta) XXX_Unmarshal

func (m *AuthMeta) XXX_Unmarshal(b []byte) error

type AuthMeta_Method

type AuthMeta_Method int32

@sync-to-public:public/src/services/idas/enums.ts:AuthMethod

const (
	AuthMeta_basic           AuthMeta_Method = 0
	AuthMeta_signature       AuthMeta_Method = 1
	AuthMeta_token           AuthMeta_Method = 2
	AuthMeta_token_signature AuthMeta_Method = 3
)

func (AuthMeta_Method) EnumDescriptor

func (AuthMeta_Method) EnumDescriptor() ([]byte, []int)

func (AuthMeta_Method) String

func (x AuthMeta_Method) String() string

type AuthorizedRedirectUrls added in v1.4.0

type AuthorizedRedirectUrls []string

func NewAuthorizedRedirectUrls added in v1.4.0

func NewAuthorizedRedirectUrls(urls []string) AuthorizedRedirectUrls

func (*AuthorizedRedirectUrls) GormDataType added in v1.4.0

func (c *AuthorizedRedirectUrls) GormDataType() string

func (*AuthorizedRedirectUrls) Scan added in v1.4.0

func (c *AuthorizedRedirectUrls) Scan(value any) error

Scan implements the Scanner interface.

func (AuthorizedRedirectUrls) Value added in v1.4.0

Value implements the driver Valuer interface.

type CompressField

type CompressField []byte

func (*CompressField) GormDataType

func (c *CompressField) GormDataType() string

func (CompressField) GormValue

func (c CompressField) GormValue(ctx context.Context, db *gorm.DB) clause.Expr

func (*CompressField) MarshalJSON

func (c *CompressField) MarshalJSON() ([]byte, error)

func (*CompressField) Scan

func (c *CompressField) Scan(value any) error

Scan implements the Scanner interface.

type Counter

type Counter struct {
	Id         string     `json:"id" gorm:"primary_key;type:char(36)" valid:"required"`
	Seed       string     `json:"seek" gorm:"type:varchar(128)"`
	Count      int64      `json:"count"`
	ExpireTime *time.Time `json:"expireTime"`
}

type Event

type Event struct {
	Model
	UserId   string        `json:"userId" gorm:"type:varchar(36);column:user_id"`
	Username string        `json:"username" gorm:"type:varchar(40);column:username"`
	Action   string        `json:"action" gorm:"type:varchar(255);column:action"`
	ClientIP string        `json:"clientIp" gorm:"type:varchar(50);column:client_ip"`
	Location string        `json:"location" gorm:"type:varchar(50);column:location"`
	Status   bool          `json:"status" gorm:"column:status"`
	Took     time.Duration `json:"took" gorm:"column:took"`
	Message  string        `json:"message"  gorm:"type:varchar(255);column:message"`
}

func (*Event) BeforeCreate

func (m *Event) BeforeCreate(db *gorm.DB) error

func (*Event) BeforeSave

func (m *Event) BeforeSave(db *gorm.DB) error

type EventLog

type EventLog struct {
	Model
	EventId string        `json:"eventId" gorm:"type:varchar(36);column:event_id"`
	Log     CompressField `json:"log"`
}

type FieldConfig

type FieldConfig struct {
	Name                 string            `protobuf:"bytes,1,opt,name=name,proto3" json:"name" valid:"required"`
	DisplayName          string            `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"displayName,omitempty"`
	ValueType            FieldType         `` /* 130-byte string literal not displayed */
	ValueEnum            map[string]string `` /* 175-byte string literal not displayed */
	Max                  float32           `protobuf:"fixed32,5,opt,name=max,proto3" json:"max,omitempty"`
	Min                  float32           `protobuf:"fixed32,6,opt,name=min,proto3" json:"min,omitempty"`
	MaxWidth             int32             `protobuf:"varint,7,opt,name=max_width,json=maxWidth,proto3" json:"maxWidth,omitempty"`
	MinWidth             int32             `protobuf:"varint,8,opt,name=min_width,json=minWidth,proto3" json:"minWidth,omitempty"`
	DefaultValue         string            `protobuf:"bytes,9,opt,name=default_value,json=defaultValue,proto3" json:"defaultValue,omitempty"`
	Tooltip              string            `protobuf:"bytes,10,opt,name=tooltip,proto3" json:"tooltip,omitempty"`
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

func (*FieldConfig) Descriptor

func (*FieldConfig) Descriptor() ([]byte, []int)

func (*FieldConfig) GetDefaultValue

func (m *FieldConfig) GetDefaultValue() string

func (*FieldConfig) GetDisplayName

func (m *FieldConfig) GetDisplayName() string

func (*FieldConfig) GetMax

func (m *FieldConfig) GetMax() float32

func (*FieldConfig) GetMaxWidth

func (m *FieldConfig) GetMaxWidth() int32

func (*FieldConfig) GetMin

func (m *FieldConfig) GetMin() float32

func (*FieldConfig) GetMinWidth

func (m *FieldConfig) GetMinWidth() int32

func (*FieldConfig) GetName

func (m *FieldConfig) GetName() string

func (*FieldConfig) GetTooltip

func (m *FieldConfig) GetTooltip() string

func (*FieldConfig) GetValueEnum

func (m *FieldConfig) GetValueEnum() map[string]string

func (*FieldConfig) GetValueType

func (m *FieldConfig) GetValueType() FieldType

func (*FieldConfig) ProtoMessage

func (*FieldConfig) ProtoMessage()

func (*FieldConfig) Reset

func (m *FieldConfig) Reset()

func (*FieldConfig) String

func (m *FieldConfig) String() string

func (*FieldConfig) XXX_DiscardUnknown

func (m *FieldConfig) XXX_DiscardUnknown()

func (*FieldConfig) XXX_Marshal

func (m *FieldConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*FieldConfig) XXX_Merge

func (m *FieldConfig) XXX_Merge(src proto.Message)

func (*FieldConfig) XXX_Size

func (m *FieldConfig) XXX_Size() int

func (*FieldConfig) XXX_Unmarshal

func (m *FieldConfig) XXX_Unmarshal(b []byte) error

type FieldType

type FieldType int32

@sync-to-public:public/src/services/idas/enums.ts:PageFieldType

const (
	FieldType_text          FieldType = 0
	FieldType_textarea      FieldType = 2
	FieldType_digit         FieldType = 3
	FieldType_digitRange    FieldType = 4
	FieldType_checkbox      FieldType = 5
	FieldType_radio         FieldType = 6
	FieldType_switch        FieldType = 7
	FieldType_select        FieldType = 8
	FieldType_multiSelect   FieldType = 9
	FieldType_timeRange     FieldType = 10
	FieldType_date          FieldType = 11
	FieldType_dateRange     FieldType = 12
	FieldType_dateTime      FieldType = 13
	FieldType_dateTimeRange FieldType = 14
)

func (FieldType) EnumDescriptor

func (FieldType) EnumDescriptor() ([]byte, []int)

func (FieldType) String

func (x FieldType) String() string

type FieldValue

type FieldValue struct {
	Raw                  string      `protobuf:"bytes,1,opt,name=raw,proto3" json:"raw,omitempty"`
	Value                interface{} `protobuf:"bytes,2,opt,name=value,proto3,customtype=interface{}" json:"value"`
	XXX_NoUnkeyedLiteral struct{}    `json:"-"`
	XXX_unrecognized     []byte      `json:"-"`
	XXX_sizecache        int32       `json:"-"`
}

func (*FieldValue) Descriptor

func (*FieldValue) Descriptor() ([]byte, []int)

func (*FieldValue) GetRaw

func (m *FieldValue) GetRaw() string

func (*FieldValue) ProtoMessage

func (*FieldValue) ProtoMessage()

func (*FieldValue) Reset

func (m *FieldValue) Reset()

func (*FieldValue) String

func (m *FieldValue) String() string

func (*FieldValue) XXX_DiscardUnknown

func (m *FieldValue) XXX_DiscardUnknown()

func (*FieldValue) XXX_Marshal

func (m *FieldValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*FieldValue) XXX_Merge

func (m *FieldValue) XXX_Merge(src proto.Message)

func (*FieldValue) XXX_Size

func (m *FieldValue) XXX_Size() int

func (*FieldValue) XXX_Unmarshal

func (m *FieldValue) XXX_Unmarshal(b []byte) error

type FieldsConfig

type FieldsConfig []*FieldConfig

func (*FieldsConfig) GormDataType

func (c *FieldsConfig) GormDataType() string

func (*FieldsConfig) Scan

func (c *FieldsConfig) Scan(value any) error

Scan implements the Scanner interface.

func (FieldsConfig) Value

func (c FieldsConfig) Value() (driver.Value, error)

Value implements the driver Valuer interface.

type File

type File struct {
	Model
	Name     string `gorm:"type:varchar(128);" `
	Path     string `gorm:"type:varchar(256);" `
	MimiType string `gorm:"type:varchar(50);" `
	Owner    string `gorm:"type:varchar(50);" `
	Size     int64
}

type HasId

type HasId interface {
	GetId() string
}

type I18nTranslate

type I18nTranslate struct {
	Id       int64  `gorm:"primaryKey;autoIncrement" json:"id"`
	Source   string `gorm:"type:varchar(20)"`
	SourceId string `gorm:"type:varchar(36)"`
	Field    string `gorm:"type:varchar(50)"`
	Lang     string `gorm:"type:varchar(10)"`
	Value    string `gorm:"type:varchar(5000)"`
}

type JSON

type JSON json.RawMessage

func (JSON) GormDataType

func (JSON) GormDataType() string

func (JSON) MarshalJSON

func (j JSON) MarshalJSON() ([]byte, error)

MarshalJSON returns m as the JSON encoding of m.

func (*JSON) Scan

func (j *JSON) Scan(value interface{}) error

Scan scan value into Jsonb, implements sql.Scanner interface

func (JSON) Value

func (j JSON) Value() (driver.Value, error)

Value return json value, implement driver.Valuer interface

type Model

type Model struct {
	Id         string                 `protobuf:"bytes,1,opt,name=id,proto3" json:"id" valid:"required" gorm:"primary_key;type:char(36)"`
	CreateTime time.Time              `` /* 151-byte string literal not displayed */
	UpdateTime time.Time              `` /* 151-byte string literal not displayed */
	IsDelete   bool                   `protobuf:"varint,4,opt,name=is_delete,json=isDelete,proto3" json:"isDelete,omitempty" gorm:"-"`
	DeleteTime gorm_io_gorm.DeletedAt `` /* 136-byte string literal not displayed */
}

func (*Model) AfterFind

func (m *Model) AfterFind(_ *gorm.DB) error

func (*Model) BeforeCreate

func (m *Model) BeforeCreate(db *gorm.DB) error

func (*Model) BeforeSave

func (m *Model) BeforeSave(db *gorm.DB) error

func (*Model) Descriptor

func (*Model) Descriptor() ([]byte, []int)

func (*Model) GetId

func (m *Model) GetId() string

func (*Model) GetIsDelete

func (m *Model) GetIsDelete() bool

func (*Model) ProtoMessage

func (*Model) ProtoMessage()

func (*Model) Reset

func (m *Model) Reset()

func (*Model) String

func (m *Model) String() string

func (*Model) XXX_DiscardUnknown

func (m *Model) XXX_DiscardUnknown()

func (*Model) XXX_Marshal

func (m *Model) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Model) XXX_Merge

func (m *Model) XXX_Merge(src proto.Message)

func (*Model) XXX_Size

func (m *Model) XXX_Size() int

func (*Model) XXX_Unmarshal

func (m *Model) XXX_Unmarshal(b []byte) error

type PageConfig

type PageConfig struct {
	Model
	Name        string       `gorm:"type:varchar(50);unique" json:"name"`
	Description string       `gorm:"type:varchar(250)" json:"description"`
	Fields      FieldsConfig `gorm:"type:blob" json:"fields,omitempty"`
	Icon        string       `gorm:"type:varchar(128)" json:"icon"`
	IsDisable   bool         `json:"isDisable"`
}

type PageData

type PageData struct {
	Model
	PageId string `json:"pageId" valid:"required"`
	Data   *JSON  `json:"data"`
}

type PageStatus

type PageStatus int32

@sync-to-public:public/src/services/idas/enums.ts:PageStatus

const (
	PageStatus_all      PageStatus = 0
	PageStatus_disabled PageStatus = 1
	PageStatus_enabled  PageStatus = 2
)

func (PageStatus) EnumDescriptor

func (PageStatus) EnumDescriptor() ([]byte, []int)

func (PageStatus) String

func (x PageStatus) String() string

type Permission

type Permission struct {
	Model
	Name        string         `gorm:"type:varchar(100);uniqueIndex:idx_t_permission_name" json:"name"`
	Description string         `gorm:"type:varchar(100);" json:"description" `
	ParentId    string         `gorm:"type:char(36)" json:"parentId"`
	EnableAuth  bool           `json:"enableAuth"`
	Children    Permissions    `gorm:"-" json:"children,omitempty"`
	Role        []string       `gorm:"-" json:"role,omitempty"`
	EnableAudit bool           `gorm:"-" json:"enableAudit,omitempty"`
	RateLimit   config.Allower `gorm:"-" json:"rateLimit,omitempty"`
}

type Permissions

type Permissions []*Permission

func (Permissions) Get

func (p Permissions) Get(name string) Permissions

func (Permissions) GetMethod

func (p Permissions) GetMethod(method string) *Permission

func (Permissions) GetRoles

func (p Permissions) GetRoles() Roles

type ProxySession

type ProxySession struct {
	User  *User
	Proxy *AppProxyConfig
}

func (*ProxySession) GetId

func (c *ProxySession) GetId() string

type Role

type Role struct {
	Model
	Name        string        `gorm:"type:varchar(50);uniqueIndex:idx_t_role_name" json:"name"`
	Description string        `gorm:"type:varchar(250);" json:"describe"`
	Type        RoleMeta_Type `json:"type"`
	AppId       string        `json:"app_id"`
	Permission  []*Permission `` /* 155-byte string literal not displayed */
}

type RoleMeta

type RoleMeta struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*RoleMeta) Descriptor

func (*RoleMeta) Descriptor() ([]byte, []int)

func (*RoleMeta) ProtoMessage

func (*RoleMeta) ProtoMessage()

func (*RoleMeta) Reset

func (m *RoleMeta) Reset()

func (*RoleMeta) String

func (m *RoleMeta) String() string

func (*RoleMeta) XXX_DiscardUnknown

func (m *RoleMeta) XXX_DiscardUnknown()

func (*RoleMeta) XXX_Marshal

func (m *RoleMeta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RoleMeta) XXX_Merge

func (m *RoleMeta) XXX_Merge(src proto.Message)

func (*RoleMeta) XXX_Size

func (m *RoleMeta) XXX_Size() int

func (*RoleMeta) XXX_Unmarshal

func (m *RoleMeta) XXX_Unmarshal(b []byte) error

type RoleMeta_Type

type RoleMeta_Type int32

@sync-to-public:public/src/services/idas/enums.ts:RoleType

const (
	RoleMeta_user   RoleMeta_Type = 0
	RoleMeta_system RoleMeta_Type = 1
)

func (RoleMeta_Type) EnumDescriptor

func (RoleMeta_Type) EnumDescriptor() ([]byte, []int)

func (RoleMeta_Type) String

func (x RoleMeta_Type) String() string

type RolePermission

type RolePermission struct {
	Permission
	RoleId string `json:"roleId"`
}

type Roles

type Roles []*Role

func (Roles) Get

func (r Roles) Get(name string) *Role

type Secret

type Secret string

func (Secret) MarshalJSON

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

func (Secret) MarshalYAML

func (s Secret) MarshalYAML() (interface{}, error)

type SystemConfig

type SystemConfig struct {
	Name  string `json:"name" gorm:"primary_key;type:varchar(100)"`
	Type  string `json:"type" gorm:"type:varchar(10)"`
	Value string `json:"value" gorm:"type:varchar(50)"`
}

type Token

type Token struct {
	Id         string       `json:"id" gorm:"primary_key;type:char(36)" valid:"required"`
	CreateTime time.Time    `json:"createTime,omitempty" gorm:"not null;type:datetime;omitempty"`
	Data       sql.RawBytes `json:"-" gorm:"not null"`
	RelationId string       `json:"relationId" gorm:"type:char(36)"`
	Expiry     time.Time    `json:"expiry,omitempty" gorm:"not null;type:datetime;omitempty"`
	Type       TokenType    `json:"type" gorm:"type:varchar(20)"`
	LastSeen   time.Time    `json:"lastSeen"`
	ParentId   string       `json:"parentId" gorm:"type:char(36)"`
}

func NewToken

func NewToken(tokenType TokenType, data interface{}) (*Token, error)

func (*Token) BeforeCreate

func (s *Token) BeforeCreate(db *gorm.DB) error

func (*Token) GetRelationId

func (s *Token) GetRelationId() string

func (*Token) To

func (s *Token) To(r interface{}) error

type TokenType

type TokenType string
const (
	TokenTypeToken         TokenType = "token"
	TokenTypeRefreshToken  TokenType = "refresh_token"
	TokenTypeCode          TokenType = "code"
	TokenTypeResetPassword TokenType = "reset_password"
	TokenTypeLoginSession  TokenType = "session"
	TokenTypeActive        TokenType = "active"
	TokenTypeAppProxyLogin TokenType = "app_proxy_login"
	TokenTypeTotpSecret    TokenType = "totp_secret"
	TokenTypeLoginCode     TokenType = "login_code"
	TokenTypeEnableMFA     TokenType = "enable_mfa"
	TokenTypeOAuthState    TokenType = "oauth_state"
)

func (TokenType) GetExpiry

func (t TokenType) GetExpiry() time.Time

type User

type User struct {
	Model        `protobuf:"bytes,1,opt,name=model,proto3,embedded=model" json:",omitempty"`
	Username     string                `protobuf:"bytes,2,opt,name=username,proto3" json:"username" gorm:"type:varchar(20);uniqueIndex:idx_user_username,sort:desc"`
	Salt         database_sql.RawBytes `protobuf:"bytes,3,opt,name=salt,proto3,customtype=database/sql.RawBytes" json:"-" gorm:"type:tinyblob"`
	Password     database_sql.RawBytes `protobuf:"bytes,4,opt,name=password,proto3,customtype=database/sql.RawBytes" json:"password,omitempty" gorm:"type:tinyblob"`
	Email        string                `protobuf:"bytes,5,opt,name=email,proto3" json:"email" gorm:"type:varchar(50)" valid:"email,optional"`
	PhoneNumber  string                `` /* 132-byte string literal not displayed */
	FullName     string                `protobuf:"bytes,7,opt,name=full_name,json=fullName,proto3" json:"fullName" gorm:"type:varchar(50)"`
	Avatar       string                `protobuf:"bytes,8,opt,name=avatar,proto3" json:"avatar" gorm:"type:varchar(128)"`
	Status       UserMeta_UserStatus   `` /* 127-byte string literal not displayed */
	LoginTime    *time.Time            `protobuf:"bytes,10,opt,name=login_time,json=loginTime,proto3,customtype=time.Time" json:"loginTime" gorm:"-"`
	RoleId       string                `protobuf:"bytes,11,opt,name=role_id,json=roleId,proto3" json:"roleId,omitempty" gorm:"->;-:migration"`
	Role         string                `protobuf:"bytes,12,opt,name=role,proto3" json:"role,omitempty" gorm:"->;-:migration"`
	Apps         Apps                  `protobuf:"bytes,13,opt,name=apps,proto3,customtype=Apps" json:"apps,omitempty" gorm:"-"`
	ExtendedData *UserExt              `protobuf:"bytes,15,opt,name=extended_data,json=extendedData,proto3,customtype=UserExt" json:"extendedData,omitempty" gorm:"-"`
}

func (*User) Descriptor

func (*User) Descriptor() ([]byte, []int)

func (User) GenSecret

func (u User) GenSecret(password ...string) []byte

func (User) GetAttr

func (u User) GetAttr(name string) string

func (*User) GetAvatar

func (m *User) GetAvatar() string

func (*User) GetEmail

func (m *User) GetEmail() string

func (*User) GetFullName

func (m *User) GetFullName() string

func (*User) GetPhoneNumber

func (m *User) GetPhoneNumber() string

func (*User) GetRole

func (m *User) GetRole() string

func (*User) GetRoleId

func (m *User) GetRoleId() string

func (*User) GetStatus

func (m *User) GetStatus() UserMeta_UserStatus

func (*User) GetUsername

func (m *User) GetUsername() string

func (User) IsForceMfa

func (u User) IsForceMfa() bool

func (User) MarshalJSON

func (u User) MarshalJSON() ([]byte, error)

func (*User) ProtoMessage

func (*User) ProtoMessage()

func (*User) Reset

func (m *User) Reset()

func (*User) String

func (m *User) String() string

func (User) VerifyTOTP added in v1.3.2

func (u User) VerifyTOTP(code string) error

func (*User) XXX_DiscardUnknown

func (m *User) XXX_DiscardUnknown()

func (*User) XXX_Marshal

func (m *User) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*User) XXX_Merge

func (m *User) XXX_Merge(src proto.Message)

func (*User) XXX_Size

func (m *User) XXX_Size() int

func (*User) XXX_Unmarshal

func (m *User) XXX_Unmarshal(b []byte) error

type UserExt

type UserExt struct {
	UserId             string `json:"userId" gorm:"primary_key;type:char(36)"`
	ForceMFA           bool
	TOTPSecret         sql.RawBytes `json:"-" gorm:"column:totp_secret;type:tinyblob"`
	TOTPSalt           sql.RawBytes `json:"-" gorm:"column:totp_salt;type:tinyblob"`
	EmailAsMFA         bool         `json:"emailAsMFA" gorm:"column:email_as_mfa"`
	SmsAsMFA           bool         `json:"smsAsMFA" gorm:"column:sms_as_mfa"`
	TOTPAsMFA          bool         `json:"totpAsMFA" gorm:"column:totp_as_mfa"`
	PasswordModifyTime time.Time    `json:"passwordModifyTime" gorm:"column:password_modify_time"`
	LoginTime          time.Time    ` json:"loginTime" gorm:"column:login_time"`
	ActivationTime     time.Time    ` json:"activationTime" gorm:"column:activation_time"`
}

func (UserExt) GetSecret

func (u UserExt) GetSecret() (secret string, err error)

func (*UserExt) SetSecret

func (u *UserExt) SetSecret(secret string) (err error)

type UserKey

type UserKey struct {
	Model
	Name    string `gorm:"type:varchar(50)" json:"name"`
	UserId  string `gorm:"type:char(36);" json:"userId"`
	Key     string `gorm:"type:varchar(50);" json:"key"`
	Secret  string `gorm:"type:varchar(50);" json:"secret"`
	Private string `gorm:"-" json:"private,omitempty"`
}

type UserMeta

type UserMeta struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*UserMeta) Descriptor

func (*UserMeta) Descriptor() ([]byte, []int)

func (*UserMeta) ProtoMessage

func (*UserMeta) ProtoMessage()

func (*UserMeta) Reset

func (m *UserMeta) Reset()

func (*UserMeta) String

func (m *UserMeta) String() string

func (*UserMeta) XXX_DiscardUnknown

func (m *UserMeta) XXX_DiscardUnknown()

func (*UserMeta) XXX_Marshal

func (m *UserMeta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*UserMeta) XXX_Merge

func (m *UserMeta) XXX_Merge(src proto.Message)

func (*UserMeta) XXX_Size

func (m *UserMeta) XXX_Size() int

func (*UserMeta) XXX_Unmarshal

func (m *UserMeta) XXX_Unmarshal(b []byte) error

type UserMeta_UserStatus

type UserMeta_UserStatus int32

@sync-to-public:public/src/services/idas/enums.ts:UserStatus

const (
	UserMeta_normal           UserMeta_UserStatus = 0
	UserMeta_disabled         UserMeta_UserStatus = 1
	UserMeta_user_inactive    UserMeta_UserStatus = 2
	UserMeta_password_expired UserMeta_UserStatus = 4
)
const (
	UserMetaStatusAll UserMeta_UserStatus = -1
)

func (UserMeta_UserStatus) EnumDescriptor

func (UserMeta_UserStatus) EnumDescriptor() ([]byte, []int)

func (UserMeta_UserStatus) Is

func (UserMeta_UserStatus) IsAnyOne

func (x UserMeta_UserStatus) IsAnyOne(s ...UserMeta_UserStatus) bool

func (UserMeta_UserStatus) String

func (x UserMeta_UserStatus) String() string

func (*UserMeta_UserStatus) UnmarshalJSON

func (x *UserMeta_UserStatus) UnmarshalJSON(bytes []byte) error

type UserPasswordHistory

type UserPasswordHistory struct {
	Model
	UserId string `gorm:"type:char(36);" json:"userId"`
	Hash   string `gorm:"type:char(88);" json:"hash"`
}

func (*UserPasswordHistory) SetPassword

func (h *UserPasswordHistory) SetPassword(p string) error

type Users

type Users []*User

func (Users) GetById

func (u Users) GetById(id string) *User

func (Users) Id

func (u Users) Id() (ids []string)

type WeakPassword

type WeakPassword struct {
	Id   int64  `gorm:"primaryKey;autoIncrement" json:"id"`
	Hash string `gorm:"type:char(88);uniqueIndex:idx_hash" json:"hash"`
}

Jump to

Keyboard shortcuts

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