domain

package
v0.7.8 Latest Latest
Warning

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

Go to latest
Published: May 12, 2022 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// AdminDomainName 默认初始化时管理员域的名称
	AdminDomainName = "admin-domain"
)
View Source
const (
	AppName = "domain"
)

Variables

View Source
var File_apps_domain_pb_domain_proto protoreflect.FileDescriptor
View Source
var File_apps_domain_pb_request_proto protoreflect.FileDescriptor
View Source
var File_apps_domain_pb_service_proto protoreflect.FileDescriptor
View Source
var File_apps_domain_pb_setting_proto protoreflect.FileDescriptor
View Source
var Service_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "infraboard.keyauth.domain.Service",
	HandlerType: (*ServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateDomain",
			Handler:    _Service_CreateDomain_Handler,
		},
		{
			MethodName: "UpdateDomain",
			Handler:    _Service_UpdateDomain_Handler,
		},
		{
			MethodName: "DescribeDomain",
			Handler:    _Service_DescribeDomain_Handler,
		},
		{
			MethodName: "QueryDomain",
			Handler:    _Service_QueryDomain_Handler,
		},
		{
			MethodName: "DeleteDomain",
			Handler:    _Service_DeleteDomain_Handler,
		},
		{
			MethodName: "UpdateDomainSecurity",
			Handler:    _Service_UpdateDomainSecurity_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "apps/domain/pb/service.proto",
}

Service_ServiceDesc is the grpc.ServiceDesc for Service service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func HttpEntry

func HttpEntry() *http.EntrySet

HttpEntry todo

func RegisterServiceServer

func RegisterServiceServer(s grpc.ServiceRegistrar, srv ServiceServer)

Types

type Contact

type Contact struct {

	// 姓名
	// @gotags: bson:"name" json:"name"
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name" bson:"name"`
	// 职位
	// @gotags: bson:"title" json:"title"
	Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title" bson:"title"`
	// 电话
	// @gotags: bson:"phone" json:"phone"
	Phone string `protobuf:"bytes,3,opt,name=phone,proto3" json:"phone" bson:"phone"`
	// 邮箱
	// @gotags: bson:"email" json:"email"
	Email string `protobuf:"bytes,4,opt,name=email,proto3" json:"email" bson:"email"`
	// contains filtered or unexported fields
}

联系人

func (*Contact) Descriptor deprecated

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

Deprecated: Use Contact.ProtoReflect.Descriptor instead.

func (*Contact) GetEmail

func (x *Contact) GetEmail() string

func (*Contact) GetName

func (x *Contact) GetName() string

func (*Contact) GetPhone

func (x *Contact) GetPhone() string

func (*Contact) GetTitle

func (x *Contact) GetTitle() string

func (*Contact) ProtoMessage

func (*Contact) ProtoMessage()

func (*Contact) ProtoReflect

func (x *Contact) ProtoReflect() protoreflect.Message

func (*Contact) Reset

func (x *Contact) Reset()

func (*Contact) String

func (x *Contact) String() string

type CreateDomainRequest

type CreateDomainRequest struct {

	// 公司或者组织名称
	// @gotags: bson:"name" json:"name"
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name" bson:"name"`
	// Profile 需要修改内容
	// @gotags: bson:"profile" json:"profile"
	Profile *DomainProfile `protobuf:"bytes,2,opt,name=profile,proto3" json:"profile" bson:"profile"`
	// 归属人
	// @gotags: bson:"owner" json:"owner"
	Owner string `protobuf:"bytes,3,opt,name=owner,proto3" json:"owner" bson:"owner"`
	// contains filtered or unexported fields
}

func NewCreateDomainRequest

func NewCreateDomainRequest() *CreateDomainRequest

NewCreateDomainRequest todo

func (*CreateDomainRequest) Descriptor deprecated

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

Deprecated: Use CreateDomainRequest.ProtoReflect.Descriptor instead.

func (*CreateDomainRequest) GetName

func (x *CreateDomainRequest) GetName() string

func (*CreateDomainRequest) GetOwner

func (x *CreateDomainRequest) GetOwner() string

func (*CreateDomainRequest) GetProfile

func (x *CreateDomainRequest) GetProfile() *DomainProfile

func (*CreateDomainRequest) ProtoMessage

func (*CreateDomainRequest) ProtoMessage()

func (*CreateDomainRequest) ProtoReflect

func (x *CreateDomainRequest) ProtoReflect() protoreflect.Message

func (*CreateDomainRequest) Reset

func (x *CreateDomainRequest) Reset()

func (*CreateDomainRequest) String

func (x *CreateDomainRequest) String() string

func (*CreateDomainRequest) Validate

func (req *CreateDomainRequest) Validate() error

Validate 校验请求是否合法

type DeleteDomainRequest

type DeleteDomainRequest struct {

	// @gotags: bson:"name" json:"name"
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name" bson:"name"`
	// contains filtered or unexported fields
}

DeleteDomainRequest 删除域

func NewDeleteDomainRequestByName

func NewDeleteDomainRequestByName(name string) *DeleteDomainRequest

NewDeleteDomainRequestByName todo

func (*DeleteDomainRequest) Descriptor deprecated

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

Deprecated: Use DeleteDomainRequest.ProtoReflect.Descriptor instead.

func (*DeleteDomainRequest) GetName

func (x *DeleteDomainRequest) GetName() string

func (*DeleteDomainRequest) ProtoMessage

func (*DeleteDomainRequest) ProtoMessage()

func (*DeleteDomainRequest) ProtoReflect

func (x *DeleteDomainRequest) ProtoReflect() protoreflect.Message

func (*DeleteDomainRequest) Reset

func (x *DeleteDomainRequest) Reset()

func (*DeleteDomainRequest) String

func (x *DeleteDomainRequest) String() string

type DescribeDomainRequest

type DescribeDomainRequest struct {

	// @gotags: bson:"name" json:"name"
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name" bson:"name"`
	// contains filtered or unexported fields
}

DescribeDomainRequest 查询domain详情请求

func NewDescribeDomainRequest

func NewDescribeDomainRequest() *DescribeDomainRequest

NewDescribeDomainRequest 查询详情请求

func NewDescribeDomainRequestWithName

func NewDescribeDomainRequestWithName(name string) *DescribeDomainRequest

NewDescribeDomainRequestWithName 查询详情请求

func (*DescribeDomainRequest) Descriptor deprecated

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

Deprecated: Use DescribeDomainRequest.ProtoReflect.Descriptor instead.

func (*DescribeDomainRequest) GetName

func (x *DescribeDomainRequest) GetName() string

func (*DescribeDomainRequest) ProtoMessage

func (*DescribeDomainRequest) ProtoMessage()

func (*DescribeDomainRequest) ProtoReflect

func (x *DescribeDomainRequest) ProtoReflect() protoreflect.Message

func (*DescribeDomainRequest) Reset

func (x *DescribeDomainRequest) Reset()

func (*DescribeDomainRequest) String

func (x *DescribeDomainRequest) String() string

func (*DescribeDomainRequest) Validate

func (req *DescribeDomainRequest) Validate() error

Validate todo

type Domain

type Domain struct {

	// 公司或者组织名称
	// @gotags: bson:"_id" json:"name"
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name" bson:"_id"`
	// 创建时间
	// @gotags: bson:"create_at" json:"create_at"
	CreateAt int64 `protobuf:"varint,2,opt,name=create_at,json=createAt,proto3" json:"create_at" bson:"create_at"`
	// 更新时间
	// @gotags: bson:"update_at" json:"update_at"
	UpdateAt int64 `protobuf:"varint,3,opt,name=update_at,json=updateAt,proto3" json:"update_at" bson:"update_at"`
	// 域拥有者
	// @gotags: bson:"owner" json:"owner"
	Owner string `protobuf:"bytes,4,opt,name=owner,proto3" json:"owner" bson:"owner"`
	// 域状态, 是否需要冻结该域, 冻结时, 该域下面所有用户禁止登录
	// @gotags: bson:"enabled" json:"enabled"
	Enabled bool `protobuf:"varint,5,opt,name=enabled,proto3" json:"enabled" bson:"enabled"`
	// CreateDomainRequest 具体属性
	// @gotags: bson:"profile" json:"profile"
	Profile *DomainProfile `protobuf:"bytes,6,opt,name=profile,proto3" json:"profile" bson:"profile"`
	// SecuritySetting 域安全设置
	// @gotags: bson:"security_setting" json:"security_setting"
	SecuritySetting *SecuritySetting `protobuf:"bytes,7,opt,name=security_setting,json=securitySetting,proto3" json:"security_setting" bson:"security_setting"`
	// contains filtered or unexported fields
}

func New

func New(req *CreateDomainRequest) (*Domain, error)

New 新建一个domain

func NewDefault

func NewDefault() *Domain

NewDefault todo

func (*Domain) Descriptor deprecated

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

Deprecated: Use Domain.ProtoReflect.Descriptor instead.

func (*Domain) GetCreateAt

func (x *Domain) GetCreateAt() int64

func (*Domain) GetEnabled

func (x *Domain) GetEnabled() bool

func (*Domain) GetName

func (x *Domain) GetName() string

func (*Domain) GetOwner

func (x *Domain) GetOwner() string

func (*Domain) GetProfile

func (x *Domain) GetProfile() *DomainProfile

func (*Domain) GetSecuritySetting

func (x *Domain) GetSecuritySetting() *SecuritySetting

func (*Domain) GetUpdateAt

func (x *Domain) GetUpdateAt() int64

func (*Domain) ProtoMessage

func (*Domain) ProtoMessage()

func (*Domain) ProtoReflect

func (x *Domain) ProtoReflect() protoreflect.Message

func (*Domain) Reset

func (x *Domain) Reset()

func (*Domain) String

func (x *Domain) String() string

type DomainProfile

type DomainProfile struct {

	// 全称
	// @gotags: bson:"display_name" json:"display_name"
	DisplayName string `protobuf:"bytes,5,opt,name=display_name,json=displayName,proto3" json:"display_name" bson:"display_name"`
	// 公司LOGO图片的URL
	// @gotags: bson:"logo_path" json:"logo_path"
	LogoPath string `protobuf:"bytes,6,opt,name=logo_path,json=logoPath,proto3" json:"logo_path" bson:"logo_path"`
	// 描述
	// @gotags: bson:"description" json:"description"
	Description string `protobuf:"bytes,7,opt,name=description,proto3" json:"description" bson:"description"`
	// 电话
	// @gotags: bson:"phone" json:"phone"
	Phone string `protobuf:"bytes,9,opt,name=phone,proto3" json:"phone" bson:"phone"`
	// 规模: 50人以下, 50~100, ...
	// @gotags: bson:"size" json:"size"
	Size string `protobuf:"bytes,10,opt,name=size,proto3" json:"size" bson:"size"`
	// 位置: 指城市, 比如 中国,四川,成都
	// @gotags: bson:"location" json:"location"
	Location string `protobuf:"bytes,11,opt,name=location,proto3" json:"location" bson:"location"`
	// 地址: 比如环球中心 10F 1034
	// @gotags: bson:"address" json:"address"
	Address string `protobuf:"bytes,12,opt,name=address,proto3" json:"address" bson:"address"`
	// 所属行业: 比如, 互联网
	// @gotags: bson:"industry" json:"industry"
	Industry string `protobuf:"bytes,13,opt,name=industry,proto3" json:"industry" bson:"industry"`
	// 传真
	// @gotags: bson:"fax" json:"fax"
	Fax string `protobuf:"bytes,14,opt,name=fax,proto3" json:"fax" bson:"fax"`
	// 联系人
	// @gotags: bson:"contack" json:"contack"
	Contack *Contact `protobuf:"bytes,15,opt,name=contack,proto3" json:"contack" bson:"contack"`
	// contains filtered or unexported fields
}

func (*DomainProfile) Descriptor deprecated

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

Deprecated: Use DomainProfile.ProtoReflect.Descriptor instead.

func (*DomainProfile) GetAddress

func (x *DomainProfile) GetAddress() string

func (*DomainProfile) GetContack

func (x *DomainProfile) GetContack() *Contact

func (*DomainProfile) GetDescription

func (x *DomainProfile) GetDescription() string

func (*DomainProfile) GetDisplayName

func (x *DomainProfile) GetDisplayName() string

func (*DomainProfile) GetFax

func (x *DomainProfile) GetFax() string

func (*DomainProfile) GetIndustry

func (x *DomainProfile) GetIndustry() string

func (*DomainProfile) GetLocation

func (x *DomainProfile) GetLocation() string

func (*DomainProfile) GetLogoPath

func (x *DomainProfile) GetLogoPath() string

func (*DomainProfile) GetPhone

func (x *DomainProfile) GetPhone() string

func (*DomainProfile) GetSize

func (x *DomainProfile) GetSize() string

func (*DomainProfile) Patch

func (req *DomainProfile) Patch(data *DomainProfile)

Patch todo

func (*DomainProfile) ProtoMessage

func (*DomainProfile) ProtoMessage()

func (*DomainProfile) ProtoReflect

func (x *DomainProfile) ProtoReflect() protoreflect.Message

func (*DomainProfile) Reset

func (x *DomainProfile) Reset()

func (*DomainProfile) String

func (x *DomainProfile) String() string

type ExceptionLockConfig

type ExceptionLockConfig struct {

	// 异地登录
	// @gotags: bson:"other_place_login" json:"other_place_login"
	OtherPlaceLogin bool `protobuf:"varint,1,opt,name=other_place_login,json=otherPlaceLogin,proto3" json:"other_place_login" bson:"other_place_login"`
	// 未登录天数
	// @gotags: bson:"not_login_days" json:"not_login_days"
	NotLoginDays uint32 `protobuf:"varint,2,opt,name=not_login_days,json=notLoginDays,proto3" json:"not_login_days" bson:"not_login_days"`
	// contains filtered or unexported fields
}

ExceptionLockConfig todo

func (*ExceptionLockConfig) Descriptor deprecated

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

Deprecated: Use ExceptionLockConfig.ProtoReflect.Descriptor instead.

func (*ExceptionLockConfig) GetNotLoginDays

func (x *ExceptionLockConfig) GetNotLoginDays() uint32

func (*ExceptionLockConfig) GetOtherPlaceLogin

func (x *ExceptionLockConfig) GetOtherPlaceLogin() bool

func (*ExceptionLockConfig) ProtoMessage

func (*ExceptionLockConfig) ProtoMessage()

func (*ExceptionLockConfig) ProtoReflect

func (x *ExceptionLockConfig) ProtoReflect() protoreflect.Message

func (*ExceptionLockConfig) Reset

func (x *ExceptionLockConfig) Reset()

func (*ExceptionLockConfig) String

func (x *ExceptionLockConfig) String() string

type IPLimiteConfig

type IPLimiteConfig struct {

	// 黑名单还是白名单
	// @gotags: bson:"type" json:"type"
	Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type" bson:"type"`
	// ip列表
	// @gotags: bson:"ip" json:"ip"
	Ip []string `protobuf:"bytes,2,rep,name=ip,proto3" json:"ip" bson:"ip"`
	// contains filtered or unexported fields
}

IPLimiteConfig todo

func (*IPLimiteConfig) Descriptor deprecated

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

Deprecated: Use IPLimiteConfig.ProtoReflect.Descriptor instead.

func (*IPLimiteConfig) GetIp

func (x *IPLimiteConfig) GetIp() []string

func (*IPLimiteConfig) GetType

func (x *IPLimiteConfig) GetType() string

func (*IPLimiteConfig) ProtoMessage

func (*IPLimiteConfig) ProtoMessage()

func (*IPLimiteConfig) ProtoReflect

func (x *IPLimiteConfig) ProtoReflect() protoreflect.Message

func (*IPLimiteConfig) Reset

func (x *IPLimiteConfig) Reset()

func (*IPLimiteConfig) String

func (x *IPLimiteConfig) String() string

type LoginSecurity

type LoginSecurity struct {

	// 异常登录锁
	// @gotags: bson:"exception_lock" json:"exception_lock"
	ExceptionLock bool `protobuf:"varint,1,opt,name=exception_lock,json=exceptionLock,proto3" json:"exception_lock" bson:"exception_lock"`
	// 异常配置
	// @gotags: bson:"exception_lock_config" json:"exception_lock_config"
	ExceptionLockConfig *ExceptionLockConfig `` /* 139-byte string literal not displayed */
	// 重试锁
	// @gotags: bson:"retry_lock" json:"retry_lock"
	RetryLock bool `protobuf:"varint,3,opt,name=retry_lock,json=retryLock,proto3" json:"retry_lock" bson:"retry_lock"`
	// 重试锁配置
	// @gotags: bson:"retry_lock_config" json:"retry_lock_config"
	RetryLockConfig *RetryLockConfig `protobuf:"bytes,4,opt,name=retry_lock_config,json=retryLockConfig,proto3" json:"retry_lock_config" bson:"retry_lock_config"`
	// IP限制
	// @gotags: bson:"ip_limite" json:"ip_limite"
	IpLimite bool `protobuf:"varint,5,opt,name=ip_limite,json=ipLimite,proto3" json:"ip_limite" bson:"ip_limite"`
	// IP限制配置
	// @gotags: bson:"ip_limite_config" json:"ip_limite_config"
	IpLimiteConfig *IPLimiteConfig `protobuf:"bytes,6,opt,name=ip_limite_config,json=ipLimiteConfig,proto3" json:"ip_limite_config" bson:"ip_limite_config"`
	// contains filtered or unexported fields
}

LoginSecurity 登录安全

func NewDefaultLoginSecurity

func NewDefaultLoginSecurity() *LoginSecurity

NewDefaultLoginSecurity todo

func (*LoginSecurity) Descriptor deprecated

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

Deprecated: Use LoginSecurity.ProtoReflect.Descriptor instead.

func (*LoginSecurity) GetExceptionLock

func (x *LoginSecurity) GetExceptionLock() bool

func (*LoginSecurity) GetExceptionLockConfig

func (x *LoginSecurity) GetExceptionLockConfig() *ExceptionLockConfig

func (*LoginSecurity) GetIpLimite

func (x *LoginSecurity) GetIpLimite() bool

func (*LoginSecurity) GetIpLimiteConfig

func (x *LoginSecurity) GetIpLimiteConfig() *IPLimiteConfig

func (*LoginSecurity) GetRetryLock

func (x *LoginSecurity) GetRetryLock() bool

func (*LoginSecurity) GetRetryLockConfig

func (x *LoginSecurity) GetRetryLockConfig() *RetryLockConfig

func (*LoginSecurity) ProtoMessage

func (*LoginSecurity) ProtoMessage()

func (*LoginSecurity) ProtoReflect

func (x *LoginSecurity) ProtoReflect() protoreflect.Message

func (*LoginSecurity) Reset

func (x *LoginSecurity) Reset()

func (*LoginSecurity) String

func (x *LoginSecurity) String() string

type PasswordSecurity

type PasswordSecurity struct {

	// 密码长度
	// @gotags: bson:"length" json:"length" validate:"required,min=8,max=64"
	Length int32 `protobuf:"varint,1,opt,name=length,proto3" json:"length" bson:"length" validate:"required,min=8,max=64"`
	// 包含数字
	// @gotags: bson:"include_number" json:"include_number"
	IncludeNumber bool `protobuf:"varint,2,opt,name=include_number,json=includeNumber,proto3" json:"include_number" bson:"include_number"`
	// 包含小写字母
	// @gotags: bson:"include_lower_letter" json:"include_lower_letter"
	IncludeLowerLetter bool `` /* 136-byte string literal not displayed */
	// 包含大写字母
	// @gotags: bson:"include_upper_letter" json:"include_upper_letter"
	IncludeUpperLetter bool `` /* 136-byte string literal not displayed */
	// 包含特殊字符
	// @gotags: bson:"include_symbols" json:"include_symbols"
	IncludeSymbols bool `protobuf:"varint,5,opt,name=include_symbols,json=includeSymbols,proto3" json:"include_symbols" bson:"include_symbols"`
	// 重复限制
	// @gotags: bson:"repeate_limite" json:"repeate_limite" validate:"required,min=1,max=24"
	RepeateLimite uint32 `` /* 146-byte string literal not displayed */
	// 密码过期时间, 密码过期后要求用户重置密码
	// @gotags: bson:"password_expired_days" json:"password_expired_days" validate:"required,min=0,max=365"
	PasswordExpiredDays uint32 `` /* 174-byte string literal not displayed */
	// 密码过期前多少天开始提醒
	// @gotags: bson:"before_expired_remind_days" json:"before_expired_remind_days" validate:"required,min=0,max=365"
	BeforeExpiredRemindDays uint32 `` /* 193-byte string literal not displayed */
	// contains filtered or unexported fields
}

PasswordSecurity 密码安全设置

func NewDefaulPasswordSecurity

func NewDefaulPasswordSecurity() *PasswordSecurity

NewDefaulPasswordSecurity todo

func (*PasswordSecurity) Check

func (p *PasswordSecurity) Check(pass string) error

Check todo

func (*PasswordSecurity) Descriptor deprecated

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

Deprecated: Use PasswordSecurity.ProtoReflect.Descriptor instead.

func (*PasswordSecurity) GenRandomPasswordConfig

func (p *PasswordSecurity) GenRandomPasswordConfig() password.Config

GenRandomPasswordConfig todo

func (*PasswordSecurity) GetBeforeExpiredRemindDays

func (x *PasswordSecurity) GetBeforeExpiredRemindDays() uint32

func (*PasswordSecurity) GetIncludeLowerLetter

func (x *PasswordSecurity) GetIncludeLowerLetter() bool

func (*PasswordSecurity) GetIncludeNumber

func (x *PasswordSecurity) GetIncludeNumber() bool

func (*PasswordSecurity) GetIncludeSymbols

func (x *PasswordSecurity) GetIncludeSymbols() bool

func (*PasswordSecurity) GetIncludeUpperLetter

func (x *PasswordSecurity) GetIncludeUpperLetter() bool

func (*PasswordSecurity) GetLength

func (x *PasswordSecurity) GetLength() int32

func (*PasswordSecurity) GetPasswordExpiredDays

func (x *PasswordSecurity) GetPasswordExpiredDays() uint32

func (*PasswordSecurity) GetRepeateLimite

func (x *PasswordSecurity) GetRepeateLimite() uint32

func (*PasswordSecurity) IsPasswordExpired

func (p *PasswordSecurity) IsPasswordExpired(pass *user.Password) error

IsPasswordExpired todo

func (*PasswordSecurity) ProtoMessage

func (*PasswordSecurity) ProtoMessage()

func (*PasswordSecurity) ProtoReflect

func (x *PasswordSecurity) ProtoReflect() protoreflect.Message

func (*PasswordSecurity) Reset

func (x *PasswordSecurity) Reset()

func (*PasswordSecurity) SetPasswordNeedReset

func (p *PasswordSecurity) SetPasswordNeedReset(pass *user.Password)

SetPasswordNeedReset todo

func (*PasswordSecurity) String

func (x *PasswordSecurity) String() string

func (*PasswordSecurity) Validate

func (p *PasswordSecurity) Validate() error

Validate 校验对象合法性

type QueryDomainRequest

type QueryDomainRequest struct {

	// @gotags: json:"page"
	Page *request.PageRequest `protobuf:"bytes,1,opt,name=page,proto3" json:"page"`
	// @gotags: json:"name"
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name"`
	// @gotags: json:"owner"
	Owner string `protobuf:"bytes,3,opt,name=owner,proto3" json:"owner"`
	// contains filtered or unexported fields
}

QueryDomainRequest 请求

func NewQueryDomainRequest

func NewQueryDomainRequest(page *request.PageRequest) *QueryDomainRequest

NewQueryDomainRequest 查询domian列表

func (*QueryDomainRequest) Descriptor deprecated

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

Deprecated: Use QueryDomainRequest.ProtoReflect.Descriptor instead.

func (*QueryDomainRequest) GetName

func (x *QueryDomainRequest) GetName() string

func (*QueryDomainRequest) GetOwner

func (x *QueryDomainRequest) GetOwner() string

func (*QueryDomainRequest) GetPage

func (x *QueryDomainRequest) GetPage() *request.PageRequest

func (*QueryDomainRequest) ProtoMessage

func (*QueryDomainRequest) ProtoMessage()

func (*QueryDomainRequest) ProtoReflect

func (x *QueryDomainRequest) ProtoReflect() protoreflect.Message

func (*QueryDomainRequest) Reset

func (x *QueryDomainRequest) Reset()

func (*QueryDomainRequest) String

func (x *QueryDomainRequest) String() string

func (*QueryDomainRequest) Validate

func (req *QueryDomainRequest) Validate() error

Validate 校验请求合法

type RetryLockConfig

type RetryLockConfig struct {

	// 重试限制
	// @gotags: bson:"retry_limite" json:"retry_limite"
	RetryLimite uint32 `protobuf:"varint,1,opt,name=retry_limite,json=retryLimite,proto3" json:"retry_limite" bson:"retry_limite"`
	// 锁定时长
	// @gotags: bson:"locked_minite" json:"locked_minite"
	LockedMinite uint32 `protobuf:"varint,2,opt,name=locked_minite,json=lockedMinite,proto3" json:"locked_minite" bson:"locked_minite"`
	// contains filtered or unexported fields
}

RetryLockConfig 重试锁配置

func (*RetryLockConfig) Descriptor deprecated

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

Deprecated: Use RetryLockConfig.ProtoReflect.Descriptor instead.

func (*RetryLockConfig) GetLockedMinite

func (x *RetryLockConfig) GetLockedMinite() uint32

func (*RetryLockConfig) GetRetryLimite

func (x *RetryLockConfig) GetRetryLimite() uint32

func (*RetryLockConfig) LockedMiniteDuration

func (c *RetryLockConfig) LockedMiniteDuration() time.Duration

LockedMiniteDuration todo

func (*RetryLockConfig) ProtoMessage

func (*RetryLockConfig) ProtoMessage()

func (*RetryLockConfig) ProtoReflect

func (x *RetryLockConfig) ProtoReflect() protoreflect.Message

func (*RetryLockConfig) Reset

func (x *RetryLockConfig) Reset()

func (*RetryLockConfig) String

func (x *RetryLockConfig) String() string

type SecuritySetting

type SecuritySetting struct {

	// 密码安全
	// @gotags: bson:"password_security" json:"password_security"
	PasswordSecurity *PasswordSecurity `protobuf:"bytes,1,opt,name=password_security,json=passwordSecurity,proto3" json:"password_security" bson:"password_security"`
	// 登录安全
	// @gotags: bson:"login_security" json:"login_security"
	LoginSecurity *LoginSecurity `protobuf:"bytes,2,opt,name=login_security,json=loginSecurity,proto3" json:"login_security" bson:"login_security"`
	// contains filtered or unexported fields
}

SecuritySetting 安全策略

func NewDefaultSecuritySetting

func NewDefaultSecuritySetting() *SecuritySetting

NewDefaultSecuritySetting todo

func (*SecuritySetting) Descriptor deprecated

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

Deprecated: Use SecuritySetting.ProtoReflect.Descriptor instead.

func (*SecuritySetting) GetLoginSecurity

func (x *SecuritySetting) GetLoginSecurity() *LoginSecurity

func (*SecuritySetting) GetPasswordRepeateLimite

func (s *SecuritySetting) GetPasswordRepeateLimite() uint

GetPasswordRepeateLimite todo

func (*SecuritySetting) GetPasswordSecurity

func (x *SecuritySetting) GetPasswordSecurity() *PasswordSecurity

func (*SecuritySetting) Patch

func (s *SecuritySetting) Patch(data *SecuritySetting)

Patch todo

func (*SecuritySetting) ProtoMessage

func (*SecuritySetting) ProtoMessage()

func (*SecuritySetting) ProtoReflect

func (x *SecuritySetting) ProtoReflect() protoreflect.Message

func (*SecuritySetting) Reset

func (x *SecuritySetting) Reset()

func (*SecuritySetting) String

func (x *SecuritySetting) String() string

type ServiceClient

type ServiceClient interface {
	CreateDomain(ctx context.Context, in *CreateDomainRequest, opts ...grpc.CallOption) (*Domain, error)
	UpdateDomain(ctx context.Context, in *UpdateDomainInfoRequest, opts ...grpc.CallOption) (*Domain, error)
	DescribeDomain(ctx context.Context, in *DescribeDomainRequest, opts ...grpc.CallOption) (*Domain, error)
	QueryDomain(ctx context.Context, in *QueryDomainRequest, opts ...grpc.CallOption) (*Set, error)
	DeleteDomain(ctx context.Context, in *DeleteDomainRequest, opts ...grpc.CallOption) (*Domain, error)
	UpdateDomainSecurity(ctx context.Context, in *UpdateDomainSecurityRequest, opts ...grpc.CallOption) (*SecuritySetting, error)
}

ServiceClient is the client API for Service service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewServiceClient

func NewServiceClient(cc grpc.ClientConnInterface) ServiceClient

type ServiceServer

type ServiceServer interface {
	CreateDomain(context.Context, *CreateDomainRequest) (*Domain, error)
	UpdateDomain(context.Context, *UpdateDomainInfoRequest) (*Domain, error)
	DescribeDomain(context.Context, *DescribeDomainRequest) (*Domain, error)
	QueryDomain(context.Context, *QueryDomainRequest) (*Set, error)
	DeleteDomain(context.Context, *DeleteDomainRequest) (*Domain, error)
	UpdateDomainSecurity(context.Context, *UpdateDomainSecurityRequest) (*SecuritySetting, error)
	// contains filtered or unexported methods
}

ServiceServer is the server API for Service service. All implementations must embed UnimplementedServiceServer for forward compatibility

type Set

type Set struct {

	// @gotags: bson:"total" json:"total"
	Total int64 `protobuf:"varint,1,opt,name=total,proto3" json:"total" bson:"total"`
	// @gotags: bson:"items" json:"items"
	Items []*Domain `protobuf:"bytes,2,rep,name=items,proto3" json:"items" bson:"items"`
	// contains filtered or unexported fields
}

func NewDomainSet

func NewDomainSet() *Set

NewDomainSet 实例

func (*Set) Add

func (s *Set) Add(d *Domain)

Add 添加Item

func (*Set) Descriptor deprecated

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

Deprecated: Use Set.ProtoReflect.Descriptor instead.

func (*Set) GetItems

func (x *Set) GetItems() []*Domain

func (*Set) GetTotal

func (x *Set) GetTotal() int64

func (*Set) Length

func (s *Set) Length() int

Length 总个数

func (*Set) ProtoMessage

func (*Set) ProtoMessage()

func (*Set) ProtoReflect

func (x *Set) ProtoReflect() protoreflect.Message

func (*Set) Reset

func (x *Set) Reset()

func (*Set) String

func (x *Set) String() string

type UnimplementedServiceServer

type UnimplementedServiceServer struct {
}

UnimplementedServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedServiceServer) CreateDomain

func (UnimplementedServiceServer) DeleteDomain

func (UnimplementedServiceServer) DescribeDomain

func (UnimplementedServiceServer) QueryDomain

func (UnimplementedServiceServer) UpdateDomain

func (UnimplementedServiceServer) UpdateDomainSecurity

type UnsafeServiceServer

type UnsafeServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ServiceServer will result in compilation errors.

type UpdateDomainInfoRequest

type UpdateDomainInfoRequest struct {

	// 更新模式
	// @gotags: bson:"update_mode" json:"update_mode"
	UpdateMode types.UpdateMode `` /* 142-byte string literal not displayed */
	// 公司或者组织名称
	// @gotags: bson:"name" json:"name"
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name" bson:"name"`
	// CreateDomainRequest 需要修改内容
	// @gotags: bson:"profile" json:"profile"
	Profile *DomainProfile `protobuf:"bytes,3,opt,name=profile,proto3" json:"profile" bson:"profile"`
	// 修改者
	// @gotags: bson:"account" json:"account"
	Account string `protobuf:"bytes,4,opt,name=account,proto3" json:"account" bson:"account"`
	// contains filtered or unexported fields
}

func NewPatchDomainRequest

func NewPatchDomainRequest() *UpdateDomainInfoRequest

NewPatchDomainRequest todo

func NewPutDomainRequest

func NewPutDomainRequest() *UpdateDomainInfoRequest

NewPutDomainRequest todo

func (*UpdateDomainInfoRequest) Descriptor deprecated

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

Deprecated: Use UpdateDomainInfoRequest.ProtoReflect.Descriptor instead.

func (*UpdateDomainInfoRequest) GetAccount

func (x *UpdateDomainInfoRequest) GetAccount() string

func (*UpdateDomainInfoRequest) GetName

func (x *UpdateDomainInfoRequest) GetName() string

func (*UpdateDomainInfoRequest) GetProfile

func (x *UpdateDomainInfoRequest) GetProfile() *DomainProfile

func (*UpdateDomainInfoRequest) GetUpdateMode

func (x *UpdateDomainInfoRequest) GetUpdateMode() types.UpdateMode

func (*UpdateDomainInfoRequest) ProtoMessage

func (*UpdateDomainInfoRequest) ProtoMessage()

func (*UpdateDomainInfoRequest) ProtoReflect

func (x *UpdateDomainInfoRequest) ProtoReflect() protoreflect.Message

func (*UpdateDomainInfoRequest) Reset

func (x *UpdateDomainInfoRequest) Reset()

func (*UpdateDomainInfoRequest) String

func (x *UpdateDomainInfoRequest) String() string

func (*UpdateDomainInfoRequest) Validate

func (req *UpdateDomainInfoRequest) Validate() error

Validate 更新校验

type UpdateDomainSecurityRequest

type UpdateDomainSecurityRequest struct {

	// 更新模式
	// @gotags: bson:"update_mode" json:"update_mode"
	UpdateMode types.UpdateMode `` /* 142-byte string literal not displayed */
	// 名称
	// @gotags: bson:"name" json:"name"
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name" bson:"name"`
	// SecuritySetting 域安全设置
	// @gotags: bson:"security_setting" json:"security_setting"
	SecuritySetting *SecuritySetting `protobuf:"bytes,3,opt,name=security_setting,json=securitySetting,proto3" json:"security_setting" bson:"security_setting"`
	// contains filtered or unexported fields
}

UpdateDomainSecurityRequest todo

func NewPutDomainSecurityRequest

func NewPutDomainSecurityRequest() *UpdateDomainSecurityRequest

NewPutDomainSecurityRequest todo

func (*UpdateDomainSecurityRequest) Descriptor deprecated

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

Deprecated: Use UpdateDomainSecurityRequest.ProtoReflect.Descriptor instead.

func (*UpdateDomainSecurityRequest) GetName

func (x *UpdateDomainSecurityRequest) GetName() string

func (*UpdateDomainSecurityRequest) GetSecuritySetting

func (x *UpdateDomainSecurityRequest) GetSecuritySetting() *SecuritySetting

func (*UpdateDomainSecurityRequest) GetUpdateMode

func (x *UpdateDomainSecurityRequest) GetUpdateMode() types.UpdateMode

func (*UpdateDomainSecurityRequest) ProtoMessage

func (*UpdateDomainSecurityRequest) ProtoMessage()

func (*UpdateDomainSecurityRequest) ProtoReflect

func (*UpdateDomainSecurityRequest) Reset

func (x *UpdateDomainSecurityRequest) Reset()

func (*UpdateDomainSecurityRequest) String

func (x *UpdateDomainSecurityRequest) String() string

func (*UpdateDomainSecurityRequest) Validate

func (req *UpdateDomainSecurityRequest) Validate() error

Validate todo

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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