domain

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2021 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

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

Variables

View Source
var DomainService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "keyauth.domain.DomainService",
	HandlerType: (*DomainServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateDomain",
			Handler:    _DomainService_CreateDomain_Handler,
		},
		{
			MethodName: "UpdateDomain",
			Handler:    _DomainService_UpdateDomain_Handler,
		},
		{
			MethodName: "DescribeDomain",
			Handler:    _DomainService_DescribeDomain_Handler,
		},
		{
			MethodName: "QueryDomain",
			Handler:    _DomainService_QueryDomain_Handler,
		},
		{
			MethodName: "DeleteDomain",
			Handler:    _DomainService_DeleteDomain_Handler,
		},
		{
			MethodName: "UpdateDomainSecurity",
			Handler:    _DomainService_UpdateDomainSecurity_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "pkg/domain/pb/service.proto",
}

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

View Source
var File_pkg_domain_pb_domain_proto protoreflect.FileDescriptor
View Source
var File_pkg_domain_pb_request_proto protoreflect.FileDescriptor
View Source
var File_pkg_domain_pb_service_proto protoreflect.FileDescriptor
View Source
var File_pkg_domain_pb_setting_proto protoreflect.FileDescriptor

Functions

func HttpEntry added in v0.2.0

func HttpEntry() *http.EntrySet

HttpEntry todo

func RegisterDomainServiceServer added in v0.2.0

func RegisterDomainServiceServer(s grpc.ServiceRegistrar, srv DomainServiceServer)

Types

type Contact added in v0.2.0

type Contact struct {

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

联系人

func (*Contact) Descriptor deprecated added in v0.2.0

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

Deprecated: Use Contact.ProtoReflect.Descriptor instead.

func (*Contact) GetEmail added in v0.2.0

func (x *Contact) GetEmail() string

func (*Contact) GetName added in v0.2.0

func (x *Contact) GetName() string

func (*Contact) GetPhone added in v0.2.0

func (x *Contact) GetPhone() string

func (*Contact) GetTitle added in v0.2.0

func (x *Contact) GetTitle() string

func (*Contact) ProtoMessage added in v0.2.0

func (*Contact) ProtoMessage()

func (*Contact) ProtoReflect added in v0.2.0

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

func (*Contact) Reset added in v0.2.0

func (x *Contact) Reset()

func (*Contact) String added in v0.2.0

func (x *Contact) String() string

type CreateDomainRequest added in v0.2.0

type CreateDomainRequest struct {

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

func NewCreateDomainRequest added in v0.2.0

func NewCreateDomainRequest() *CreateDomainRequest

NewCreateDomainRequest todo

func (*CreateDomainRequest) Descriptor deprecated added in v0.2.0

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

Deprecated: Use CreateDomainRequest.ProtoReflect.Descriptor instead.

func (*CreateDomainRequest) GetName added in v0.2.0

func (x *CreateDomainRequest) GetName() string

func (*CreateDomainRequest) GetProfile added in v0.2.0

func (x *CreateDomainRequest) GetProfile() *DomainProfile

func (*CreateDomainRequest) ProtoMessage added in v0.2.0

func (*CreateDomainRequest) ProtoMessage()

func (*CreateDomainRequest) ProtoReflect added in v0.2.0

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

func (*CreateDomainRequest) Reset added in v0.2.0

func (x *CreateDomainRequest) Reset()

func (*CreateDomainRequest) String added in v0.2.0

func (x *CreateDomainRequest) String() string

func (*CreateDomainRequest) Validate added in v0.2.0

func (req *CreateDomainRequest) Validate() error

Validate 校验请求是否合法

type DeleteDomainRequest added in v0.2.0

type DeleteDomainRequest struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name" bson:"name"`
	// contains filtered or unexported fields
}

DeleteDomainRequest 删除域

func NewDeleteDomainRequestByName added in v0.2.0

func NewDeleteDomainRequestByName(name string) *DeleteDomainRequest

NewDeleteDomainRequestByName todo

func (*DeleteDomainRequest) Descriptor deprecated added in v0.2.0

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

Deprecated: Use DeleteDomainRequest.ProtoReflect.Descriptor instead.

func (*DeleteDomainRequest) GetName added in v0.2.0

func (x *DeleteDomainRequest) GetName() string

func (*DeleteDomainRequest) ProtoMessage added in v0.2.0

func (*DeleteDomainRequest) ProtoMessage()

func (*DeleteDomainRequest) ProtoReflect added in v0.2.0

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

func (*DeleteDomainRequest) Reset added in v0.2.0

func (x *DeleteDomainRequest) Reset()

func (*DeleteDomainRequest) String added in v0.2.0

func (x *DeleteDomainRequest) String() string

type DescribeDomainRequest added in v0.2.0

type DescribeDomainRequest struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name" bson:"name"`
	// contains filtered or unexported fields
}

DescribeDomainRequest 查询domain详情请求

func NewDescribeDomainRequest added in v0.2.0

func NewDescribeDomainRequest() *DescribeDomainRequest

NewDescribeDomainRequest 查询详情请求

func NewDescribeDomainRequestWithName added in v0.2.0

func NewDescribeDomainRequestWithName(name string) *DescribeDomainRequest

NewDescribeDomainRequestWithName 查询详情请求

func (*DescribeDomainRequest) Descriptor deprecated added in v0.2.0

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

Deprecated: Use DescribeDomainRequest.ProtoReflect.Descriptor instead.

func (*DescribeDomainRequest) GetName added in v0.2.0

func (x *DescribeDomainRequest) GetName() string

func (*DescribeDomainRequest) ProtoMessage added in v0.2.0

func (*DescribeDomainRequest) ProtoMessage()

func (*DescribeDomainRequest) ProtoReflect added in v0.2.0

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

func (*DescribeDomainRequest) Reset added in v0.2.0

func (x *DescribeDomainRequest) Reset()

func (*DescribeDomainRequest) String added in v0.2.0

func (x *DescribeDomainRequest) String() string

func (*DescribeDomainRequest) Validate added in v0.2.0

func (req *DescribeDomainRequest) Validate() error

Validate todo

type Domain

type Domain struct {

	// 公司或者组织名称
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name" bson:"_id"`
	// 创建时间
	CreateAt int64 `protobuf:"varint,2,opt,name=create_at,json=createAt,proto3" json:"create_at" bson:"create_at"`
	// 更新时间
	UpdateAt int64 `protobuf:"varint,3,opt,name=update_at,json=updateAt,proto3" json:"update_at" bson:"update_at"`
	// 域拥有者
	Owner string `protobuf:"bytes,4,opt,name=owner,proto3" json:"owner" bson:"owner"`
	// 域状态, 是否需要冻结该域, 冻结时, 该域下面所有用户禁止登录
	Enabled bool `protobuf:"varint,5,opt,name=enabled,proto3" json:"enabled" bson:"enabled"`
	// CreateDomainRequest 具体属性
	Profile *DomainProfile `protobuf:"bytes,6,opt,name=profile,proto3" json:"profile" bson:"profile"`
	// SecuritySetting 域安全设置
	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(owner string, req *CreateDomainRequest) (*Domain, error)

New 新建一个domain

func NewDefault added in v0.2.0

func NewDefault() *Domain

NewDefault todo

func (*Domain) Descriptor deprecated added in v0.2.0

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

Deprecated: Use Domain.ProtoReflect.Descriptor instead.

func (*Domain) GetCreateAt added in v0.2.0

func (x *Domain) GetCreateAt() int64

func (*Domain) GetEnabled added in v0.2.0

func (x *Domain) GetEnabled() bool

func (*Domain) GetName added in v0.2.0

func (x *Domain) GetName() string

func (*Domain) GetOwner added in v0.2.0

func (x *Domain) GetOwner() string

func (*Domain) GetProfile added in v0.2.0

func (x *Domain) GetProfile() *DomainProfile

func (*Domain) GetSecuritySetting added in v0.2.0

func (x *Domain) GetSecuritySetting() *SecuritySetting

func (*Domain) GetUpdateAt added in v0.2.0

func (x *Domain) GetUpdateAt() int64

func (*Domain) ProtoMessage added in v0.2.0

func (*Domain) ProtoMessage()

func (*Domain) ProtoReflect added in v0.2.0

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

func (*Domain) Reset added in v0.2.0

func (x *Domain) Reset()

func (*Domain) String

func (x *Domain) String() string

type DomainProfile added in v0.2.0

type DomainProfile struct {

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

func (*DomainProfile) Descriptor deprecated added in v0.2.0

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

Deprecated: Use DomainProfile.ProtoReflect.Descriptor instead.

func (*DomainProfile) GetAddress added in v0.2.0

func (x *DomainProfile) GetAddress() string

func (*DomainProfile) GetContack added in v0.2.0

func (x *DomainProfile) GetContack() *Contact

func (*DomainProfile) GetDescription added in v0.2.0

func (x *DomainProfile) GetDescription() string

func (*DomainProfile) GetDisplayName added in v0.2.0

func (x *DomainProfile) GetDisplayName() string

func (*DomainProfile) GetFax added in v0.2.0

func (x *DomainProfile) GetFax() string

func (*DomainProfile) GetIndustry added in v0.2.0

func (x *DomainProfile) GetIndustry() string

func (*DomainProfile) GetLocation added in v0.2.0

func (x *DomainProfile) GetLocation() string

func (*DomainProfile) GetLogoPath added in v0.2.0

func (x *DomainProfile) GetLogoPath() string

func (*DomainProfile) GetPhone added in v0.2.0

func (x *DomainProfile) GetPhone() string

func (*DomainProfile) GetSize added in v0.2.0

func (x *DomainProfile) GetSize() string

func (*DomainProfile) Patch added in v0.2.0

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

Patch todo

func (*DomainProfile) ProtoMessage added in v0.2.0

func (*DomainProfile) ProtoMessage()

func (*DomainProfile) ProtoReflect added in v0.2.0

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

func (*DomainProfile) Reset added in v0.2.0

func (x *DomainProfile) Reset()

func (*DomainProfile) String added in v0.2.0

func (x *DomainProfile) String() string

type DomainServiceClient added in v0.2.0

type DomainServiceClient 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)
}

DomainServiceClient is the client API for DomainService 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 NewDomainServiceClient added in v0.2.0

func NewDomainServiceClient(cc grpc.ClientConnInterface) DomainServiceClient

type DomainServiceServer added in v0.2.0

type DomainServiceServer 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
}

DomainServiceServer is the server API for DomainService service. All implementations must embed UnimplementedDomainServiceServer for forward compatibility

type ExceptionLockConfig added in v0.2.0

type ExceptionLockConfig struct {

	// 异地登录
	OtherPlaceLogin bool `protobuf:"varint,1,opt,name=other_place_login,json=otherPlaceLogin,proto3" json:"other_place_login" bson:"other_place_login"`
	// 未登录天数,
	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 added in v0.2.0

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

Deprecated: Use ExceptionLockConfig.ProtoReflect.Descriptor instead.

func (*ExceptionLockConfig) GetNotLoginDays added in v0.2.0

func (x *ExceptionLockConfig) GetNotLoginDays() uint32

func (*ExceptionLockConfig) GetOtherPlaceLogin added in v0.2.0

func (x *ExceptionLockConfig) GetOtherPlaceLogin() bool

func (*ExceptionLockConfig) ProtoMessage added in v0.2.0

func (*ExceptionLockConfig) ProtoMessage()

func (*ExceptionLockConfig) ProtoReflect added in v0.2.0

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

func (*ExceptionLockConfig) Reset added in v0.2.0

func (x *ExceptionLockConfig) Reset()

func (*ExceptionLockConfig) String added in v0.2.0

func (x *ExceptionLockConfig) String() string

type IPLimiteConfig added in v0.2.0

type IPLimiteConfig struct {

	// 黑名单还是白名单
	Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type" bson:"type"`
	// 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 added in v0.2.0

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

Deprecated: Use IPLimiteConfig.ProtoReflect.Descriptor instead.

func (*IPLimiteConfig) GetIp added in v0.2.0

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

func (*IPLimiteConfig) GetType added in v0.2.0

func (x *IPLimiteConfig) GetType() string

func (*IPLimiteConfig) ProtoMessage added in v0.2.0

func (*IPLimiteConfig) ProtoMessage()

func (*IPLimiteConfig) ProtoReflect added in v0.2.0

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

func (*IPLimiteConfig) Reset added in v0.2.0

func (x *IPLimiteConfig) Reset()

func (*IPLimiteConfig) String added in v0.2.0

func (x *IPLimiteConfig) String() string

type LoginSecurity added in v0.2.0

type LoginSecurity struct {

	// 异常登录锁
	ExceptionLock bool `protobuf:"varint,1,opt,name=exception_lock,json=exceptionLock,proto3" json:"exception_lock" bson:"exception_lock"`
	// 异常配置
	ExceptionLockConfig *ExceptionLockConfig `` /* 139-byte string literal not displayed */
	// 重试锁
	RetryLock bool `protobuf:"varint,3,opt,name=retry_lock,json=retryLock,proto3" json:"retry_lock" bson:"retry_lock"`
	// 重试锁配置
	RetryLockConfig *RetryLockConfig `protobuf:"bytes,4,opt,name=retry_lock_config,json=retryLockConfig,proto3" json:"retry_lock_config" bson:"retry_lock_config"`
	// IP限制
	IpLimite bool `protobuf:"varint,5,opt,name=ip_limite,json=ipLimite,proto3" json:"ip_limite" bson:"ip_limite"`
	// IP限制配置
	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 added in v0.2.0

func NewDefaultLoginSecurity() *LoginSecurity

NewDefaultLoginSecurity todo

func (*LoginSecurity) Descriptor deprecated added in v0.2.0

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

Deprecated: Use LoginSecurity.ProtoReflect.Descriptor instead.

func (*LoginSecurity) GetExceptionLock added in v0.2.0

func (x *LoginSecurity) GetExceptionLock() bool

func (*LoginSecurity) GetExceptionLockConfig added in v0.2.0

func (x *LoginSecurity) GetExceptionLockConfig() *ExceptionLockConfig

func (*LoginSecurity) GetIpLimite added in v0.2.0

func (x *LoginSecurity) GetIpLimite() bool

func (*LoginSecurity) GetIpLimiteConfig added in v0.2.0

func (x *LoginSecurity) GetIpLimiteConfig() *IPLimiteConfig

func (*LoginSecurity) GetRetryLock added in v0.2.0

func (x *LoginSecurity) GetRetryLock() bool

func (*LoginSecurity) GetRetryLockConfig added in v0.2.0

func (x *LoginSecurity) GetRetryLockConfig() *RetryLockConfig

func (*LoginSecurity) ProtoMessage added in v0.2.0

func (*LoginSecurity) ProtoMessage()

func (*LoginSecurity) ProtoReflect added in v0.2.0

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

func (*LoginSecurity) Reset added in v0.2.0

func (x *LoginSecurity) Reset()

func (*LoginSecurity) String added in v0.2.0

func (x *LoginSecurity) String() string

type PasswordSecurity added in v0.2.0

type PasswordSecurity struct {

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

PasswordSecurity 密码安全设置

func NewDefaulPasswordSecurity added in v0.2.0

func NewDefaulPasswordSecurity() *PasswordSecurity

NewDefaulPasswordSecurity todo

func (*PasswordSecurity) Check added in v0.2.0

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

Check todo

func (*PasswordSecurity) Descriptor deprecated added in v0.2.0

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

Deprecated: Use PasswordSecurity.ProtoReflect.Descriptor instead.

func (*PasswordSecurity) GenRandomPasswordConfig added in v0.2.0

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

GenRandomPasswordConfig todo

func (*PasswordSecurity) GetBeforeExpiredRemindDays added in v0.2.0

func (x *PasswordSecurity) GetBeforeExpiredRemindDays() uint32

func (*PasswordSecurity) GetIncludeLowerLetter added in v0.2.0

func (x *PasswordSecurity) GetIncludeLowerLetter() bool

func (*PasswordSecurity) GetIncludeNumber added in v0.2.0

func (x *PasswordSecurity) GetIncludeNumber() bool

func (*PasswordSecurity) GetIncludeSymbols added in v0.2.0

func (x *PasswordSecurity) GetIncludeSymbols() bool

func (*PasswordSecurity) GetIncludeUpperLetter added in v0.2.0

func (x *PasswordSecurity) GetIncludeUpperLetter() bool

func (*PasswordSecurity) GetLength added in v0.2.0

func (x *PasswordSecurity) GetLength() int32

func (*PasswordSecurity) GetPasswordExpiredDays added in v0.2.0

func (x *PasswordSecurity) GetPasswordExpiredDays() uint32

func (*PasswordSecurity) GetRepeateLimite added in v0.2.0

func (x *PasswordSecurity) GetRepeateLimite() uint32

func (*PasswordSecurity) IsPasswordExpired added in v0.2.0

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

IsPasswordExpired todo

func (*PasswordSecurity) ProtoMessage added in v0.2.0

func (*PasswordSecurity) ProtoMessage()

func (*PasswordSecurity) ProtoReflect added in v0.2.0

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

func (*PasswordSecurity) Reset added in v0.2.0

func (x *PasswordSecurity) Reset()

func (*PasswordSecurity) SetPasswordNeedReset added in v0.2.0

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

SetPasswordNeedReset todo

func (*PasswordSecurity) String added in v0.2.0

func (x *PasswordSecurity) String() string

func (*PasswordSecurity) Validate added in v0.2.0

func (p *PasswordSecurity) Validate() error

Validate 校验对象合法性

type QueryDomainRequest

type QueryDomainRequest struct {
	Page *page.PageRequest `protobuf:"bytes,1,opt,name=page,proto3" json:"page" bson:"page"`
	Name string            `protobuf:"bytes,2,opt,name=name,proto3" json:"name" bson:"name"`
	// contains filtered or unexported fields
}

QueryDomainRequest 请求

func NewQueryDomainRequest

func NewQueryDomainRequest(page *request.PageRequest) *QueryDomainRequest

NewQueryDomainRequest 查询domian列表

func (*QueryDomainRequest) Descriptor deprecated added in v0.2.0

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

Deprecated: Use QueryDomainRequest.ProtoReflect.Descriptor instead.

func (*QueryDomainRequest) GetName added in v0.2.0

func (x *QueryDomainRequest) GetName() string

func (*QueryDomainRequest) GetPage added in v0.2.0

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

func (*QueryDomainRequest) ProtoMessage added in v0.2.0

func (*QueryDomainRequest) ProtoMessage()

func (*QueryDomainRequest) ProtoReflect added in v0.2.0

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

func (*QueryDomainRequest) Reset added in v0.2.0

func (x *QueryDomainRequest) Reset()

func (*QueryDomainRequest) String added in v0.2.0

func (x *QueryDomainRequest) String() string

func (*QueryDomainRequest) Validate

func (req *QueryDomainRequest) Validate() error

Validate 校验请求合法

type RetryLockConfig added in v0.2.0

type RetryLockConfig struct {

	// 重试限制
	RetryLimite uint32 `protobuf:"varint,1,opt,name=retry_limite,json=retryLimite,proto3" json:"retry_limite" bson:"retry_limite"`
	// 锁定时长
	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 added in v0.2.0

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

Deprecated: Use RetryLockConfig.ProtoReflect.Descriptor instead.

func (*RetryLockConfig) GetLockedMinite added in v0.2.0

func (x *RetryLockConfig) GetLockedMinite() uint32

func (*RetryLockConfig) GetRetryLimite added in v0.2.0

func (x *RetryLockConfig) GetRetryLimite() uint32

func (*RetryLockConfig) LockedMiniteDuration added in v0.2.0

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

LockedMiniteDuration todo

func (*RetryLockConfig) ProtoMessage added in v0.2.0

func (*RetryLockConfig) ProtoMessage()

func (*RetryLockConfig) ProtoReflect added in v0.2.0

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

func (*RetryLockConfig) Reset added in v0.2.0

func (x *RetryLockConfig) Reset()

func (*RetryLockConfig) String added in v0.2.0

func (x *RetryLockConfig) String() string

type SecuritySetting added in v0.2.0

type SecuritySetting struct {

	// 密码安全
	PasswordSecurity *PasswordSecurity `protobuf:"bytes,1,opt,name=password_security,json=passwordSecurity,proto3" json:"password_security" bson:"password_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 added in v0.2.0

func NewDefaultSecuritySetting() *SecuritySetting

NewDefaultSecuritySetting todo

func (*SecuritySetting) Descriptor deprecated added in v0.2.0

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

Deprecated: Use SecuritySetting.ProtoReflect.Descriptor instead.

func (*SecuritySetting) GetLoginSecurity added in v0.2.0

func (x *SecuritySetting) GetLoginSecurity() *LoginSecurity

func (*SecuritySetting) GetPasswordRepeateLimite added in v0.2.0

func (s *SecuritySetting) GetPasswordRepeateLimite() uint

GetPasswordRepeateLimite todo

func (*SecuritySetting) GetPasswordSecurity added in v0.2.0

func (x *SecuritySetting) GetPasswordSecurity() *PasswordSecurity

func (*SecuritySetting) Patch added in v0.2.0

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

Patch todo

func (*SecuritySetting) ProtoMessage added in v0.2.0

func (*SecuritySetting) ProtoMessage()

func (*SecuritySetting) ProtoReflect added in v0.2.0

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

func (*SecuritySetting) Reset added in v0.2.0

func (x *SecuritySetting) Reset()

func (*SecuritySetting) String added in v0.2.0

func (x *SecuritySetting) String() string

type Set

type Set struct {
	Total int64     `protobuf:"varint,1,opt,name=total,proto3" json:"total" bson:"total"`
	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 added in v0.2.0

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

Deprecated: Use Set.ProtoReflect.Descriptor instead.

func (*Set) GetItems added in v0.2.0

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

func (*Set) GetTotal added in v0.2.0

func (x *Set) GetTotal() int64

func (*Set) Length

func (s *Set) Length() int

Length 总个数

func (*Set) ProtoMessage added in v0.2.0

func (*Set) ProtoMessage()

func (*Set) ProtoReflect added in v0.2.0

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

func (*Set) Reset added in v0.2.0

func (x *Set) Reset()

func (*Set) String added in v0.2.0

func (x *Set) String() string

type UnimplementedDomainServiceServer added in v0.2.0

type UnimplementedDomainServiceServer struct {
}

UnimplementedDomainServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedDomainServiceServer) CreateDomain added in v0.2.0

func (UnimplementedDomainServiceServer) DeleteDomain added in v0.2.0

func (UnimplementedDomainServiceServer) DescribeDomain added in v0.2.0

func (UnimplementedDomainServiceServer) QueryDomain added in v0.2.0

func (UnimplementedDomainServiceServer) UpdateDomain added in v0.2.0

func (UnimplementedDomainServiceServer) UpdateDomainSecurity added in v0.2.0

type UnsafeDomainServiceServer added in v0.2.0

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

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

type UpdateDomainInfoRequest added in v0.2.0

type UpdateDomainInfoRequest struct {

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

func NewPatchDomainRequest added in v0.2.0

func NewPatchDomainRequest() *UpdateDomainInfoRequest

NewPatchDomainRequest todo

func NewPutDomainRequest added in v0.2.0

func NewPutDomainRequest() *UpdateDomainInfoRequest

NewPutDomainRequest todo

func (*UpdateDomainInfoRequest) Descriptor deprecated added in v0.2.0

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

Deprecated: Use UpdateDomainInfoRequest.ProtoReflect.Descriptor instead.

func (*UpdateDomainInfoRequest) GetName added in v0.2.0

func (x *UpdateDomainInfoRequest) GetName() string

func (*UpdateDomainInfoRequest) GetProfile added in v0.2.0

func (x *UpdateDomainInfoRequest) GetProfile() *DomainProfile

func (*UpdateDomainInfoRequest) GetUpdateMode added in v0.2.0

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

func (*UpdateDomainInfoRequest) ProtoMessage added in v0.2.0

func (*UpdateDomainInfoRequest) ProtoMessage()

func (*UpdateDomainInfoRequest) ProtoReflect added in v0.2.0

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

func (*UpdateDomainInfoRequest) Reset added in v0.2.0

func (x *UpdateDomainInfoRequest) Reset()

func (*UpdateDomainInfoRequest) String added in v0.2.0

func (x *UpdateDomainInfoRequest) String() string

func (*UpdateDomainInfoRequest) Validate added in v0.2.0

func (req *UpdateDomainInfoRequest) Validate() error

Validate 更新校验

type UpdateDomainSecurityRequest added in v0.2.0

type UpdateDomainSecurityRequest struct {

	// 更新模式
	UpdateMode types.UpdateMode `` /* 138-byte string literal not displayed */
	// 名称
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name" bson:"name"`
	// SecuritySetting 域安全设置
	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 added in v0.2.0

func NewPutDomainSecurityRequest() *UpdateDomainSecurityRequest

NewPutDomainSecurityRequest todo

func (*UpdateDomainSecurityRequest) Descriptor deprecated added in v0.2.0

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

Deprecated: Use UpdateDomainSecurityRequest.ProtoReflect.Descriptor instead.

func (*UpdateDomainSecurityRequest) GetName added in v0.2.0

func (x *UpdateDomainSecurityRequest) GetName() string

func (*UpdateDomainSecurityRequest) GetSecuritySetting added in v0.2.0

func (x *UpdateDomainSecurityRequest) GetSecuritySetting() *SecuritySetting

func (*UpdateDomainSecurityRequest) GetUpdateMode added in v0.2.0

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

func (*UpdateDomainSecurityRequest) ProtoMessage added in v0.2.0

func (*UpdateDomainSecurityRequest) ProtoMessage()

func (*UpdateDomainSecurityRequest) ProtoReflect added in v0.2.0

func (*UpdateDomainSecurityRequest) Reset added in v0.2.0

func (x *UpdateDomainSecurityRequest) Reset()

func (*UpdateDomainSecurityRequest) String added in v0.2.0

func (x *UpdateDomainSecurityRequest) String() string

func (*UpdateDomainSecurityRequest) Validate added in v0.2.0

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