Documentation ¶
Index ¶
- Variables
- func RegisterUsersServiceServer(s *grpc.Server, srv UsersServiceServer)
- type AddRoleRequest
- func (*AddRoleRequest) Descriptor() ([]byte, []int)
- func (m *AddRoleRequest) GetRole() Role
- func (m *AddRoleRequest) GetUuid() string
- func (*AddRoleRequest) ProtoMessage()
- func (m *AddRoleRequest) Reset()
- func (m *AddRoleRequest) String() string
- func (this *AddRoleRequest) Validate() error
- func (m *AddRoleRequest) XXX_DiscardUnknown()
- func (m *AddRoleRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *AddRoleRequest) XXX_Merge(src proto.Message)
- func (m *AddRoleRequest) XXX_Size() int
- func (m *AddRoleRequest) XXX_Unmarshal(b []byte) error
- type AuthRequest
- func (*AuthRequest) Descriptor() ([]byte, []int)
- func (m *AuthRequest) GetEmail() string
- func (m *AuthRequest) GetPassword() string
- func (*AuthRequest) ProtoMessage()
- func (m *AuthRequest) Reset()
- func (m *AuthRequest) String() string
- func (this *AuthRequest) Validate() error
- func (m *AuthRequest) XXX_DiscardUnknown()
- func (m *AuthRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *AuthRequest) XXX_Merge(src proto.Message)
- func (m *AuthRequest) XXX_Size() int
- func (m *AuthRequest) XXX_Unmarshal(b []byte) error
- type AuthResponse
- func (*AuthResponse) Descriptor() ([]byte, []int)
- func (m *AuthResponse) GetErrors() []*Error
- func (m *AuthResponse) GetToken() string
- func (m *AuthResponse) GetValid() bool
- func (*AuthResponse) ProtoMessage()
- func (m *AuthResponse) Reset()
- func (m *AuthResponse) String() string
- func (this *AuthResponse) Validate() error
- func (m *AuthResponse) XXX_DiscardUnknown()
- func (m *AuthResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *AuthResponse) XXX_Merge(src proto.Message)
- func (m *AuthResponse) XXX_Size() int
- func (m *AuthResponse) XXX_Unmarshal(b []byte) error
- type CreateUserRequest
- func (*CreateUserRequest) Descriptor() ([]byte, []int)
- func (m *CreateUserRequest) GetCompany() string
- func (m *CreateUserRequest) GetEmail() string
- func (m *CreateUserRequest) GetPassword() string
- func (*CreateUserRequest) ProtoMessage()
- func (m *CreateUserRequest) Reset()
- func (m *CreateUserRequest) String() string
- func (this *CreateUserRequest) Validate() error
- func (m *CreateUserRequest) XXX_DiscardUnknown()
- func (m *CreateUserRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CreateUserRequest) XXX_Merge(src proto.Message)
- func (m *CreateUserRequest) XXX_Size() int
- func (m *CreateUserRequest) XXX_Unmarshal(b []byte) error
- type CreateUserResponse
- func (*CreateUserResponse) Descriptor() ([]byte, []int)
- func (m *CreateUserResponse) GetStateCode() ResponseStateCode
- func (*CreateUserResponse) ProtoMessage()
- func (m *CreateUserResponse) Reset()
- func (m *CreateUserResponse) String() string
- func (this *CreateUserResponse) Validate() error
- func (m *CreateUserResponse) XXX_DiscardUnknown()
- func (m *CreateUserResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CreateUserResponse) XXX_Merge(src proto.Message)
- func (m *CreateUserResponse) XXX_Size() int
- func (m *CreateUserResponse) XXX_Unmarshal(b []byte) error
- type Error
- func (*Error) Descriptor() ([]byte, []int)
- func (m *Error) GetCode() int32
- func (m *Error) GetDescription() string
- func (*Error) ProtoMessage()
- func (m *Error) Reset()
- func (m *Error) String() string
- func (this *Error) Validate() error
- func (m *Error) XXX_DiscardUnknown()
- func (m *Error) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Error) XXX_Merge(src proto.Message)
- func (m *Error) XXX_Size() int
- func (m *Error) XXX_Unmarshal(b []byte) error
- type ResponseStateCode
- type Role
- type UnimplementedUsersServiceServer
- func (*UnimplementedUsersServiceServer) AddRole(ctx context.Context, req *AddRoleRequest) (*empty.Empty, error)
- func (*UnimplementedUsersServiceServer) Auth(ctx context.Context, req *AuthRequest) (*AuthResponse, error)
- func (*UnimplementedUsersServiceServer) CreateUser(ctx context.Context, req *CreateUserRequest) (*CreateUserResponse, error)
- type UsersServiceClient
- type UsersServiceServer
Constants ¶
This section is empty.
Variables ¶
View Source
var ResponseStateCode_name = map[int32]string{
0: "CREATED",
}
View Source
var ResponseStateCode_value = map[string]int32{
"CREATED": 0,
}
View Source
var Role_name = map[int32]string{
0: "UNKNOWN",
1: "USER",
2: "USER_ADMIN",
}
View Source
var Role_value = map[string]int32{
"UNKNOWN": 0,
"USER": 1,
"USER_ADMIN": 2,
}
Functions ¶
func RegisterUsersServiceServer ¶
func RegisterUsersServiceServer(s *grpc.Server, srv UsersServiceServer)
Types ¶
type AddRoleRequest ¶
type AddRoleRequest struct { Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` Role Role `protobuf:"varint,2,opt,name=role,proto3,enum=srv.users.Role" json:"role,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*AddRoleRequest) Descriptor ¶
func (*AddRoleRequest) Descriptor() ([]byte, []int)
func (*AddRoleRequest) GetRole ¶
func (m *AddRoleRequest) GetRole() Role
func (*AddRoleRequest) GetUuid ¶
func (m *AddRoleRequest) GetUuid() string
func (*AddRoleRequest) ProtoMessage ¶
func (*AddRoleRequest) ProtoMessage()
func (*AddRoleRequest) Reset ¶
func (m *AddRoleRequest) Reset()
func (*AddRoleRequest) String ¶
func (m *AddRoleRequest) String() string
func (*AddRoleRequest) Validate ¶
func (this *AddRoleRequest) Validate() error
func (*AddRoleRequest) XXX_DiscardUnknown ¶
func (m *AddRoleRequest) XXX_DiscardUnknown()
func (*AddRoleRequest) XXX_Marshal ¶
func (m *AddRoleRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*AddRoleRequest) XXX_Merge ¶
func (m *AddRoleRequest) XXX_Merge(src proto.Message)
func (*AddRoleRequest) XXX_Size ¶
func (m *AddRoleRequest) XXX_Size() int
func (*AddRoleRequest) XXX_Unmarshal ¶
func (m *AddRoleRequest) XXX_Unmarshal(b []byte) error
type AuthRequest ¶
type AuthRequest struct { Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*AuthRequest) Descriptor ¶
func (*AuthRequest) Descriptor() ([]byte, []int)
func (*AuthRequest) GetEmail ¶
func (m *AuthRequest) GetEmail() string
func (*AuthRequest) GetPassword ¶
func (m *AuthRequest) GetPassword() string
func (*AuthRequest) ProtoMessage ¶
func (*AuthRequest) ProtoMessage()
func (*AuthRequest) Reset ¶
func (m *AuthRequest) Reset()
func (*AuthRequest) String ¶
func (m *AuthRequest) String() string
func (*AuthRequest) Validate ¶
func (this *AuthRequest) Validate() error
func (*AuthRequest) XXX_DiscardUnknown ¶
func (m *AuthRequest) XXX_DiscardUnknown()
func (*AuthRequest) XXX_Marshal ¶
func (m *AuthRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*AuthRequest) XXX_Merge ¶
func (m *AuthRequest) XXX_Merge(src proto.Message)
func (*AuthRequest) XXX_Size ¶
func (m *AuthRequest) XXX_Size() int
func (*AuthRequest) XXX_Unmarshal ¶
func (m *AuthRequest) XXX_Unmarshal(b []byte) error
type AuthResponse ¶
type AuthResponse struct { Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` Valid bool `protobuf:"varint,2,opt,name=valid,proto3" json:"valid,omitempty"` Errors []*Error `protobuf:"bytes,3,rep,name=errors,proto3" json:"errors,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*AuthResponse) Descriptor ¶
func (*AuthResponse) Descriptor() ([]byte, []int)
func (*AuthResponse) GetErrors ¶
func (m *AuthResponse) GetErrors() []*Error
func (*AuthResponse) GetToken ¶
func (m *AuthResponse) GetToken() string
func (*AuthResponse) GetValid ¶
func (m *AuthResponse) GetValid() bool
func (*AuthResponse) ProtoMessage ¶
func (*AuthResponse) ProtoMessage()
func (*AuthResponse) Reset ¶
func (m *AuthResponse) Reset()
func (*AuthResponse) String ¶
func (m *AuthResponse) String() string
func (*AuthResponse) Validate ¶
func (this *AuthResponse) Validate() error
func (*AuthResponse) XXX_DiscardUnknown ¶
func (m *AuthResponse) XXX_DiscardUnknown()
func (*AuthResponse) XXX_Marshal ¶
func (m *AuthResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*AuthResponse) XXX_Merge ¶
func (m *AuthResponse) XXX_Merge(src proto.Message)
func (*AuthResponse) XXX_Size ¶
func (m *AuthResponse) XXX_Size() int
func (*AuthResponse) XXX_Unmarshal ¶
func (m *AuthResponse) XXX_Unmarshal(b []byte) error
type CreateUserRequest ¶
type CreateUserRequest struct { Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` Company string `protobuf:"bytes,3,opt,name=company,proto3" json:"company,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*CreateUserRequest) Descriptor ¶
func (*CreateUserRequest) Descriptor() ([]byte, []int)
func (*CreateUserRequest) GetCompany ¶
func (m *CreateUserRequest) GetCompany() string
func (*CreateUserRequest) GetEmail ¶
func (m *CreateUserRequest) GetEmail() string
func (*CreateUserRequest) GetPassword ¶
func (m *CreateUserRequest) GetPassword() string
func (*CreateUserRequest) ProtoMessage ¶
func (*CreateUserRequest) ProtoMessage()
func (*CreateUserRequest) Reset ¶
func (m *CreateUserRequest) Reset()
func (*CreateUserRequest) String ¶
func (m *CreateUserRequest) String() string
func (*CreateUserRequest) Validate ¶
func (this *CreateUserRequest) Validate() error
func (*CreateUserRequest) XXX_DiscardUnknown ¶
func (m *CreateUserRequest) XXX_DiscardUnknown()
func (*CreateUserRequest) XXX_Marshal ¶
func (m *CreateUserRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CreateUserRequest) XXX_Merge ¶
func (m *CreateUserRequest) XXX_Merge(src proto.Message)
func (*CreateUserRequest) XXX_Size ¶
func (m *CreateUserRequest) XXX_Size() int
func (*CreateUserRequest) XXX_Unmarshal ¶
func (m *CreateUserRequest) XXX_Unmarshal(b []byte) error
type CreateUserResponse ¶
type CreateUserResponse struct { StateCode ResponseStateCode `protobuf:"varint,1,opt,name=stateCode,proto3,enum=srv.users.ResponseStateCode" json:"stateCode,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*CreateUserResponse) Descriptor ¶
func (*CreateUserResponse) Descriptor() ([]byte, []int)
func (*CreateUserResponse) GetStateCode ¶
func (m *CreateUserResponse) GetStateCode() ResponseStateCode
func (*CreateUserResponse) ProtoMessage ¶
func (*CreateUserResponse) ProtoMessage()
func (*CreateUserResponse) Reset ¶
func (m *CreateUserResponse) Reset()
func (*CreateUserResponse) String ¶
func (m *CreateUserResponse) String() string
func (*CreateUserResponse) Validate ¶
func (this *CreateUserResponse) Validate() error
func (*CreateUserResponse) XXX_DiscardUnknown ¶
func (m *CreateUserResponse) XXX_DiscardUnknown()
func (*CreateUserResponse) XXX_Marshal ¶
func (m *CreateUserResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CreateUserResponse) XXX_Merge ¶
func (m *CreateUserResponse) XXX_Merge(src proto.Message)
func (*CreateUserResponse) XXX_Size ¶
func (m *CreateUserResponse) XXX_Size() int
func (*CreateUserResponse) XXX_Unmarshal ¶
func (m *CreateUserResponse) XXX_Unmarshal(b []byte) error
type Error ¶
type Error struct { Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Error) Descriptor ¶
func (*Error) GetDescription ¶
func (*Error) ProtoMessage ¶
func (*Error) ProtoMessage()
func (*Error) XXX_DiscardUnknown ¶
func (m *Error) XXX_DiscardUnknown()
func (*Error) XXX_Marshal ¶
func (*Error) XXX_Unmarshal ¶
type ResponseStateCode ¶
type ResponseStateCode int32
const (
ResponseStateCode_CREATED ResponseStateCode = 0
)
func (ResponseStateCode) EnumDescriptor ¶
func (ResponseStateCode) EnumDescriptor() ([]byte, []int)
func (ResponseStateCode) String ¶
func (x ResponseStateCode) String() string
type UnimplementedUsersServiceServer ¶
type UnimplementedUsersServiceServer struct { }
UnimplementedUsersServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedUsersServiceServer) AddRole ¶
func (*UnimplementedUsersServiceServer) AddRole(ctx context.Context, req *AddRoleRequest) (*empty.Empty, error)
func (*UnimplementedUsersServiceServer) Auth ¶
func (*UnimplementedUsersServiceServer) Auth(ctx context.Context, req *AuthRequest) (*AuthResponse, error)
func (*UnimplementedUsersServiceServer) CreateUser ¶
func (*UnimplementedUsersServiceServer) CreateUser(ctx context.Context, req *CreateUserRequest) (*CreateUserResponse, error)
type UsersServiceClient ¶
type UsersServiceClient interface { CreateUser(ctx context.Context, in *CreateUserRequest, opts ...grpc.CallOption) (*CreateUserResponse, error) Auth(ctx context.Context, in *AuthRequest, opts ...grpc.CallOption) (*AuthResponse, error) AddRole(ctx context.Context, in *AddRoleRequest, opts ...grpc.CallOption) (*empty.Empty, error) }
UsersServiceClient is the client API for UsersService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewUsersServiceClient ¶
func NewUsersServiceClient(cc *grpc.ClientConn) UsersServiceClient
type UsersServiceServer ¶
type UsersServiceServer interface { CreateUser(context.Context, *CreateUserRequest) (*CreateUserResponse, error) Auth(context.Context, *AuthRequest) (*AuthResponse, error) AddRole(context.Context, *AddRoleRequest) (*empty.Empty, error) }
UsersServiceServer is the server API for UsersService service.
Click to show internal directories.
Click to hide internal directories.