Documentation ¶
Overview ¶
Package handler is a generated protocol buffer package.
It is generated from these files:
service.proto
It has these top-level messages:
User SCPayload
Index ¶
- Constants
- Variables
- func ApplyCreate(address string, user *User, context *processor.Context) error
- func ApplyUpdate(address string, userUpdateData *User, context *processor.Context) error
- func GetUserValidationErrors(user *User) []string
- func Hexdigest(str string) string
- type PayloadType
- type SCHandler
- type SCPayload
- type User
- func (*User) Descriptor() ([]byte, []int)
- func (m *User) GetBirthdate() float64
- func (m *User) GetEmail() string
- func (m *User) GetIsVerified() bool
- func (m *User) GetName() string
- func (m *User) GetPhoneNumber() string
- func (m *User) GetPushToken() string
- func (m *User) GetSex() string
- func (m *User) GetUin() string
- func (*User) ProtoMessage()
- func (m *User) Reset()
- func (m *User) String() string
Constants ¶
View Source
const ( NAME = "tfa" VERSION = "0.1" )
Variables ¶
View Source
var PayloadType_name = map[int32]string{
0: "USER_CREATE",
1: "USER_UPDATE",
}
View Source
var PayloadType_value = map[string]int32{
"USER_CREATE": 0,
"USER_UPDATE": 1,
}
View Source
var RE = regexp.MustCompile(`^\+?[1-9]\d{1,14}$`)
View Source
var RE_EMAIL = regexp.MustCompile("^[a-zA-Z0-9.!#$%&'*+/=?^_" + "{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$")
Functions ¶
func ApplyUpdate ¶
func GetUserValidationErrors ¶
Types ¶
type PayloadType ¶
type PayloadType int32
const ( PayloadType_USER_CREATE PayloadType = 0 PayloadType_USER_UPDATE PayloadType = 1 )
func (PayloadType) EnumDescriptor ¶
func (PayloadType) EnumDescriptor() ([]byte, []int)
func (PayloadType) String ¶
func (x PayloadType) String() string
type SCHandler ¶
type SCHandler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func (*SCHandler) Apply ¶
func (self *SCHandler) Apply(request *processor_pb2.TpProcessRequest, context *processor.Context) error
func (*SCHandler) FamilyName ¶
func (*SCHandler) FamilyVersions ¶
func (*SCHandler) Namespaces ¶
type SCPayload ¶
type SCPayload struct { Action PayloadType `protobuf:"varint,1,opt,name=Action,enum=PayloadType" json:"Action,omitempty"` PhoneNumber string `protobuf:"bytes,2,opt,name=PhoneNumber" json:"PhoneNumber,omitempty"` PayloadUser *User `protobuf:"bytes,3,opt,name=PayloadUser" json:"PayloadUser,omitempty"` }
todo: rename SCPayload to SPayload before todo: next protocol buffer update todo: переименовать sex в gender
func (*SCPayload) Descriptor ¶
func (*SCPayload) GetAction ¶
func (m *SCPayload) GetAction() PayloadType
func (*SCPayload) GetPayloadUser ¶
func (*SCPayload) GetPhoneNumber ¶
func (*SCPayload) ProtoMessage ¶
func (*SCPayload) ProtoMessage()
type User ¶
type User struct { PhoneNumber string `protobuf:"bytes,1,opt,name=PhoneNumber" json:"PhoneNumber,omitempty"` Uin string `protobuf:"bytes,2,opt,name=Uin" json:"Uin,omitempty"` Name string `protobuf:"bytes,3,opt,name=Name" json:"Name,omitempty"` IsVerified bool `protobuf:"varint,4,opt,name=IsVerified" json:"IsVerified,omitempty"` Email string `protobuf:"bytes,5,opt,name=Email" json:"Email,omitempty"` Sex string `protobuf:"bytes,6,opt,name=Sex" json:"Sex,omitempty"` Birthdate float64 `protobuf:"fixed64,7,opt,name=Birthdate" json:"Birthdate,omitempty"` PushToken string `protobuf:"bytes,8,opt,name=PushToken" json:"PushToken,omitempty"` }
func (*User) Descriptor ¶
func (*User) GetBirthdate ¶
func (*User) GetIsVerified ¶
func (*User) GetPhoneNumber ¶
func (*User) GetPushToken ¶
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
Click to show internal directories.
Click to hide internal directories.