Documentation ¶
Index ¶
- Variables
- func NewUserDeviceEndpoints() []*api.Endpoint
- func RegisterUserDeviceHandler(s server.Server, hdlr UserDeviceHandler, opts ...server.HandlerOption) error
- type Device
- func (*Device) Descriptor() ([]byte, []int)deprecated
- func (x *Device) GetDeviceFingerprint() string
- func (x *Device) GetDeviceName() string
- func (x *Device) GetLanguage() string
- func (x *Device) GetPlatform() string
- func (x *Device) GetPlatformApp() string
- func (x *Device) GetToken() string
- func (x *Device) GetVersion() string
- func (*Device) ProtoMessage()
- func (x *Device) ProtoReflect() protoreflect.Message
- func (x *Device) Reset()
- func (x *Device) String() string
- func (m *Device) Validate() error
- func (m *Device) ValidateAll() error
- type DeviceListRequest
- func (*DeviceListRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DeviceListRequest) GetUserId() int64
- func (*DeviceListRequest) ProtoMessage()
- func (x *DeviceListRequest) ProtoReflect() protoreflect.Message
- func (x *DeviceListRequest) Reset()
- func (x *DeviceListRequest) String() string
- func (m *DeviceListRequest) Validate() error
- func (m *DeviceListRequest) ValidateAll() error
- type DeviceListRequestMultiError
- type DeviceListRequestValidationError
- func (e DeviceListRequestValidationError) Cause() error
- func (e DeviceListRequestValidationError) Error() string
- func (e DeviceListRequestValidationError) ErrorName() string
- func (e DeviceListRequestValidationError) Field() string
- func (e DeviceListRequestValidationError) Key() bool
- func (e DeviceListRequestValidationError) Reason() string
- type DeviceListResponse
- func (*DeviceListResponse) Descriptor() ([]byte, []int)deprecated
- func (x *DeviceListResponse) GetDevices() []*Device
- func (*DeviceListResponse) ProtoMessage()
- func (x *DeviceListResponse) ProtoReflect() protoreflect.Message
- func (x *DeviceListResponse) Reset()
- func (x *DeviceListResponse) String() string
- func (m *DeviceListResponse) Validate() error
- func (m *DeviceListResponse) ValidateAll() error
- type DeviceListResponseMultiError
- type DeviceListResponseValidationError
- func (e DeviceListResponseValidationError) Cause() error
- func (e DeviceListResponseValidationError) Error() string
- func (e DeviceListResponseValidationError) ErrorName() string
- func (e DeviceListResponseValidationError) Field() string
- func (e DeviceListResponseValidationError) Key() bool
- func (e DeviceListResponseValidationError) Reason() string
- type DeviceMultiError
- type DeviceValidationError
- type UserDeviceHandler
- type UserDeviceService
Constants ¶
This section is empty.
Variables ¶
var File_proto_device_device_proto protoreflect.FileDescriptor
Functions ¶
func NewUserDeviceEndpoints ¶
func RegisterUserDeviceHandler ¶
func RegisterUserDeviceHandler(s server.Server, hdlr UserDeviceHandler, opts ...server.HandlerOption) error
Types ¶
type Device ¶
type Device struct { Platform string `protobuf:"bytes,1,opt,name=Platform,proto3" json:"Platform"` // 平台 Language string `protobuf:"bytes,2,opt,name=Language,proto3" json:"Language"` // 语言 Version string `protobuf:"bytes,3,opt,name=Version,proto3" json:"Version"` // 版本 DeviceFingerprint string `protobuf:"bytes,4,opt,name=DeviceFingerprint,proto3" json:"DeviceFingerprint"` // 设备指纹 DeviceName string `protobuf:"bytes,5,opt,name=DeviceName,proto3" json:"DeviceName"` // 设备名称 Token string `protobuf:"bytes,6,opt,name=Token,proto3" json:"Token"` // 当前token PlatformApp string `protobuf:"bytes,7,opt,name=PlatformApp,proto3" json:"PlatformApp"` // ShowId内部平台 // contains filtered or unexported fields }
func (*Device) Descriptor
deprecated
func (*Device) GetDeviceFingerprint ¶
func (*Device) GetDeviceName ¶
func (*Device) GetLanguage ¶
func (*Device) GetPlatform ¶
func (*Device) GetPlatformApp ¶
func (*Device) GetVersion ¶
func (*Device) ProtoMessage ¶
func (*Device) ProtoMessage()
func (*Device) ProtoReflect ¶
func (x *Device) ProtoReflect() protoreflect.Message
func (*Device) Validate ¶
Validate checks the field values on Device with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*Device) ValidateAll ¶
ValidateAll checks the field values on Device with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in DeviceMultiError, or nil if none found.
type DeviceListRequest ¶
type DeviceListRequest struct { UserId int64 `protobuf:"varint,1,opt,name=UserId,proto3" json:"UserId"` // 用户ID // contains filtered or unexported fields }
[请求] 获取
func (*DeviceListRequest) Descriptor
deprecated
func (*DeviceListRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeviceListRequest.ProtoReflect.Descriptor instead.
func (*DeviceListRequest) GetUserId ¶
func (x *DeviceListRequest) GetUserId() int64
func (*DeviceListRequest) ProtoMessage ¶
func (*DeviceListRequest) ProtoMessage()
func (*DeviceListRequest) ProtoReflect ¶
func (x *DeviceListRequest) ProtoReflect() protoreflect.Message
func (*DeviceListRequest) Reset ¶
func (x *DeviceListRequest) Reset()
func (*DeviceListRequest) String ¶
func (x *DeviceListRequest) String() string
func (*DeviceListRequest) Validate ¶
func (m *DeviceListRequest) Validate() error
Validate checks the field values on DeviceListRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*DeviceListRequest) ValidateAll ¶
func (m *DeviceListRequest) ValidateAll() error
ValidateAll checks the field values on DeviceListRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in DeviceListRequestMultiError, or nil if none found.
type DeviceListRequestMultiError ¶
type DeviceListRequestMultiError []error
DeviceListRequestMultiError is an error wrapping multiple validation errors returned by DeviceListRequest.ValidateAll() if the designated constraints aren't met.
func (DeviceListRequestMultiError) AllErrors ¶
func (m DeviceListRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (DeviceListRequestMultiError) Error ¶
func (m DeviceListRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type DeviceListRequestValidationError ¶
type DeviceListRequestValidationError struct {
// contains filtered or unexported fields
}
DeviceListRequestValidationError is the validation error returned by DeviceListRequest.Validate if the designated constraints aren't met.
func (DeviceListRequestValidationError) Cause ¶
func (e DeviceListRequestValidationError) Cause() error
Cause function returns cause value.
func (DeviceListRequestValidationError) Error ¶
func (e DeviceListRequestValidationError) Error() string
Error satisfies the builtin error interface
func (DeviceListRequestValidationError) ErrorName ¶
func (e DeviceListRequestValidationError) ErrorName() string
ErrorName returns error name.
func (DeviceListRequestValidationError) Field ¶
func (e DeviceListRequestValidationError) Field() string
Field function returns field value.
func (DeviceListRequestValidationError) Key ¶
func (e DeviceListRequestValidationError) Key() bool
Key function returns key value.
func (DeviceListRequestValidationError) Reason ¶
func (e DeviceListRequestValidationError) Reason() string
Reason function returns reason value.
type DeviceListResponse ¶
type DeviceListResponse struct { Devices []*Device `protobuf:"bytes,1,rep,name=Devices,proto3" json:"Devices"` // 设备列表 // contains filtered or unexported fields }
[响应] 获取token
func (*DeviceListResponse) Descriptor
deprecated
func (*DeviceListResponse) Descriptor() ([]byte, []int)
Deprecated: Use DeviceListResponse.ProtoReflect.Descriptor instead.
func (*DeviceListResponse) GetDevices ¶
func (x *DeviceListResponse) GetDevices() []*Device
func (*DeviceListResponse) ProtoMessage ¶
func (*DeviceListResponse) ProtoMessage()
func (*DeviceListResponse) ProtoReflect ¶
func (x *DeviceListResponse) ProtoReflect() protoreflect.Message
func (*DeviceListResponse) Reset ¶
func (x *DeviceListResponse) Reset()
func (*DeviceListResponse) String ¶
func (x *DeviceListResponse) String() string
func (*DeviceListResponse) Validate ¶
func (m *DeviceListResponse) Validate() error
Validate checks the field values on DeviceListResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*DeviceListResponse) ValidateAll ¶
func (m *DeviceListResponse) ValidateAll() error
ValidateAll checks the field values on DeviceListResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in DeviceListResponseMultiError, or nil if none found.
type DeviceListResponseMultiError ¶
type DeviceListResponseMultiError []error
DeviceListResponseMultiError is an error wrapping multiple validation errors returned by DeviceListResponse.ValidateAll() if the designated constraints aren't met.
func (DeviceListResponseMultiError) AllErrors ¶
func (m DeviceListResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (DeviceListResponseMultiError) Error ¶
func (m DeviceListResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type DeviceListResponseValidationError ¶
type DeviceListResponseValidationError struct {
// contains filtered or unexported fields
}
DeviceListResponseValidationError is the validation error returned by DeviceListResponse.Validate if the designated constraints aren't met.
func (DeviceListResponseValidationError) Cause ¶
func (e DeviceListResponseValidationError) Cause() error
Cause function returns cause value.
func (DeviceListResponseValidationError) Error ¶
func (e DeviceListResponseValidationError) Error() string
Error satisfies the builtin error interface
func (DeviceListResponseValidationError) ErrorName ¶
func (e DeviceListResponseValidationError) ErrorName() string
ErrorName returns error name.
func (DeviceListResponseValidationError) Field ¶
func (e DeviceListResponseValidationError) Field() string
Field function returns field value.
func (DeviceListResponseValidationError) Key ¶
func (e DeviceListResponseValidationError) Key() bool
Key function returns key value.
func (DeviceListResponseValidationError) Reason ¶
func (e DeviceListResponseValidationError) Reason() string
Reason function returns reason value.
type DeviceMultiError ¶
type DeviceMultiError []error
DeviceMultiError is an error wrapping multiple validation errors returned by Device.ValidateAll() if the designated constraints aren't met.
func (DeviceMultiError) AllErrors ¶
func (m DeviceMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (DeviceMultiError) Error ¶
func (m DeviceMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type DeviceValidationError ¶
type DeviceValidationError struct {
// contains filtered or unexported fields
}
DeviceValidationError is the validation error returned by Device.Validate if the designated constraints aren't met.
func (DeviceValidationError) Cause ¶
func (e DeviceValidationError) Cause() error
Cause function returns cause value.
func (DeviceValidationError) Error ¶
func (e DeviceValidationError) Error() string
Error satisfies the builtin error interface
func (DeviceValidationError) ErrorName ¶
func (e DeviceValidationError) ErrorName() string
ErrorName returns error name.
func (DeviceValidationError) Field ¶
func (e DeviceValidationError) Field() string
Field function returns field value.
func (DeviceValidationError) Key ¶
func (e DeviceValidationError) Key() bool
Key function returns key value.
func (DeviceValidationError) Reason ¶
func (e DeviceValidationError) Reason() string
Reason function returns reason value.
type UserDeviceHandler ¶
type UserDeviceHandler interface {
List(context.Context, *DeviceListRequest, *DeviceListResponse) error
}
type UserDeviceService ¶
type UserDeviceService interface {
List(ctx context.Context, in *DeviceListRequest, opts ...client.CallOption) (*DeviceListResponse, error)
}
func NewUserDeviceService ¶
func NewUserDeviceService(name string, c client.Client) UserDeviceService