domain

package
v1.7.6 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WhitelistTypeCloud      = "cloud"
	WhitelistTypeMultiCloud = "multi-cloud"
	WhitelistTypeInference  = "inference"
)

Variables

This section is empty.

Functions

func IsSameDomainValue

func IsSameDomainValue(a, b DomainValue) bool

Types

type Account

type Account interface {
	Account() string
}

Account

func NewAccount

func NewAccount(v string) (Account, error)

type AvatarId

type AvatarId interface {
	AvatarId() string

	DomainValue
}

AvatarId

func NewAvatarId

func NewAvatarId(v string) (AvatarId, error)

type Bio

type Bio interface {
	Bio() string

	DomainValue
}

Bio

func NewBio

func NewBio(v string) (Bio, error)

type City

type City interface {
	City() string
}

City

func NewCity

func NewCity(v string) (City, error)

type DomainValue

type DomainValue interface {
	DomainValue() string
}

DomainValue

type Email

type Email interface {
	Email() string
}

Email

func NewEmail

func NewEmail(v string) (Email, error)

type FollowerInfo

type FollowerInfo struct {
	User     Account
	Follower Account
}

type FollowerUserInfo

type FollowerUserInfo struct {
	Account    Account
	AvatarId   AvatarId
	Bio        Bio
	IsFollower bool
}

type Identity

type Identity interface {
	Identity() string
}

Identity

func NewIdentity

func NewIdentity(v string) (Identity, error)

type Name

type Name interface {
	Name() string
}

Name

func NewName

func NewName(v string) (Name, error)

type Password

type Password interface {
	Password() string
}

Password

func NewPassword

func NewPassword(s string) (Password, error)

type Phone

type Phone interface {
	Phone() string
}

Phone

func NewPhone

func NewPhone(v string) (Phone, error)

type PlatformToken

type PlatformToken struct {
	Token    string `json:"token"`
	CreateAt int64  `json:"create_at"`
}

type PlatformUser

type PlatformUser struct {
	Id          string
	NamespaceId string
}

type Province

type Province interface {
	Province() string
}

Province

func NewProvince

func NewProvince(v string) (Province, error)

type User

type User struct {
	Id      string
	Email   Email
	Account Account

	Bio      Bio
	AvatarId AvatarId

	PlatformUser  PlatformUser
	PlatformToken PlatformToken

	CourseAgreement   string
	FinetuneAgreement string
	UserAgreement     string

	Version int

	// following fields is not under the controlling of version
	FollowerCount  int
	FollowingCount int

	IsAgreePrivacy bool
}

user

func (*User) RevokePrivacy added in v1.6.1

func (u *User) RevokePrivacy()

type UserAvatarSetEvent

type UserAvatarSetEvent struct {
	Account  types.Account
	AvatarId AvatarId
}

type UserBioSetEvent

type UserBioSetEvent struct {
	Account types.Account
	Bio     Bio
}

type UserInfo

type UserInfo struct {
	Account  Account
	AvatarId AvatarId
}

type UserRegInfo

type UserRegInfo struct {
	Account  types.Account
	Name     Name
	City     City
	Email    Email
	Phone    Phone
	Identity Identity
	Province Province
	Detail   map[string]string
	Version  int
}

register

type UserSignedUpEvent

type UserSignedUpEvent struct {
	Account types.Account
}

type WhiteListInfo

type WhiteListInfo struct {
	Account   types.Account
	Type      WhiteListType
	Enabled   bool
	StartTime int64
	EndTime   int64
}

whitelist

func (WhiteListInfo) Enable

func (w WhiteListInfo) Enable() bool

type WhiteListType

type WhiteListType interface {
	WhiteListType() string
}

WhiteList Type

func NewWhiteListType

func NewWhiteListType(w string) (WhiteListType, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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