Documentation
¶
Overview ¶
Package user is a reverse proxy.
It translates gRPC into GraphQL.
Index ¶
- func RegisterUserServerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterUserServerHandler(mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterUserServerHandlerClient(mux *runtime.ServeMux, client UserServerClient) error
- func RegisterUserServerServer(s *grpc.Server, srv UserServerServer)
- type AllUsersResponse
- func (*AllUsersResponse) Descriptor() ([]byte, []int)
- func (m *AllUsersResponse) GetUsers() []*User
- func (*AllUsersResponse) ProtoMessage()
- func (m *AllUsersResponse) Reset()
- func (m *AllUsersResponse) String() string
- func (m *AllUsersResponse) XXX_DiscardUnknown()
- func (m *AllUsersResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *AllUsersResponse) XXX_Merge(src proto.Message)
- func (m *AllUsersResponse) XXX_Size() int
- func (m *AllUsersResponse) XXX_Unmarshal(b []byte) error
- type GithubAuthRequest
- func (*GithubAuthRequest) Descriptor() ([]byte, []int)
- func (m *GithubAuthRequest) GetCode() string
- func (*GithubAuthRequest) ProtoMessage()
- func (m *GithubAuthRequest) Reset()
- func (m *GithubAuthRequest) String() string
- func (m *GithubAuthRequest) XXX_DiscardUnknown()
- func (m *GithubAuthRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GithubAuthRequest) XXX_Merge(src proto.Message)
- func (m *GithubAuthRequest) XXX_Size() int
- func (m *GithubAuthRequest) XXX_Unmarshal(b []byte) error
- type GithubAuthResponse
- func (*GithubAuthResponse) Descriptor() ([]byte, []int)
- func (m *GithubAuthResponse) GetToken() string
- func (m *GithubAuthResponse) GetUser() *User
- func (*GithubAuthResponse) ProtoMessage()
- func (m *GithubAuthResponse) Reset()
- func (m *GithubAuthResponse) String() string
- func (m *GithubAuthResponse) XXX_DiscardUnknown()
- func (m *GithubAuthResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GithubAuthResponse) XXX_Merge(src proto.Message)
- func (m *GithubAuthResponse) XXX_Size() int
- func (m *GithubAuthResponse) XXX_Unmarshal(b []byte) error
- type LoginRequest
- func (*LoginRequest) Descriptor() ([]byte, []int)
- func (m *LoginRequest) GetLogin() string
- func (*LoginRequest) ProtoMessage()
- func (m *LoginRequest) Reset()
- func (m *LoginRequest) String() string
- func (m *LoginRequest) XXX_DiscardUnknown()
- func (m *LoginRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *LoginRequest) XXX_Merge(src proto.Message)
- func (m *LoginRequest) XXX_Size() int
- func (m *LoginRequest) XXX_Unmarshal(b []byte) error
- type TotalUsersResponse
- func (*TotalUsersResponse) Descriptor() ([]byte, []int)
- func (m *TotalUsersResponse) GetTotal() int32
- func (*TotalUsersResponse) ProtoMessage()
- func (m *TotalUsersResponse) Reset()
- func (m *TotalUsersResponse) String() string
- func (m *TotalUsersResponse) XXX_DiscardUnknown()
- func (m *TotalUsersResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TotalUsersResponse) XXX_Merge(src proto.Message)
- func (m *TotalUsersResponse) XXX_Size() int
- func (m *TotalUsersResponse) XXX_Unmarshal(b []byte) error
- type User
- func (*User) Descriptor() ([]byte, []int)
- func (m *User) GetAvatar() string
- func (m *User) GetGithubLogin() string
- func (m *User) GetName() string
- func (*User) ProtoMessage()
- func (m *User) Reset()
- func (m *User) String() string
- func (m *User) XXX_DiscardUnknown()
- func (m *User) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *User) XXX_Merge(src proto.Message)
- func (m *User) XXX_Size() int
- func (m *User) XXX_Unmarshal(b []byte) error
- type UserResponse
- func (*UserResponse) Descriptor() ([]byte, []int)
- func (m *UserResponse) GetUser() *User
- func (*UserResponse) ProtoMessage()
- func (m *UserResponse) Reset()
- func (m *UserResponse) String() string
- func (m *UserResponse) XXX_DiscardUnknown()
- func (m *UserResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *UserResponse) XXX_Merge(src proto.Message)
- func (m *UserResponse) XXX_Size() int
- func (m *UserResponse) XXX_Unmarshal(b []byte) error
- type UserServerClient
- type UserServerServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterUserServerHandler ¶
func RegisterUserServerHandler(mux *runtime.ServeMux, conn *grpc.ClientConn) error
func RegisterUserServerHandlerClient ¶
func RegisterUserServerHandlerClient(mux *runtime.ServeMux, client UserServerClient) error
func RegisterUserServerServer ¶
func RegisterUserServerServer(s *grpc.Server, srv UserServerServer)
Types ¶
type AllUsersResponse ¶
type AllUsersResponse struct { Users []*User `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*AllUsersResponse) Descriptor ¶
func (*AllUsersResponse) Descriptor() ([]byte, []int)
func (*AllUsersResponse) GetUsers ¶
func (m *AllUsersResponse) GetUsers() []*User
func (*AllUsersResponse) ProtoMessage ¶
func (*AllUsersResponse) ProtoMessage()
func (*AllUsersResponse) Reset ¶
func (m *AllUsersResponse) Reset()
func (*AllUsersResponse) String ¶
func (m *AllUsersResponse) String() string
func (*AllUsersResponse) XXX_DiscardUnknown ¶
func (m *AllUsersResponse) XXX_DiscardUnknown()
func (*AllUsersResponse) XXX_Marshal ¶
func (m *AllUsersResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*AllUsersResponse) XXX_Merge ¶
func (m *AllUsersResponse) XXX_Merge(src proto.Message)
func (*AllUsersResponse) XXX_Size ¶
func (m *AllUsersResponse) XXX_Size() int
func (*AllUsersResponse) XXX_Unmarshal ¶
func (m *AllUsersResponse) XXX_Unmarshal(b []byte) error
type GithubAuthRequest ¶
type GithubAuthRequest struct { Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*GithubAuthRequest) Descriptor ¶
func (*GithubAuthRequest) Descriptor() ([]byte, []int)
func (*GithubAuthRequest) GetCode ¶
func (m *GithubAuthRequest) GetCode() string
func (*GithubAuthRequest) ProtoMessage ¶
func (*GithubAuthRequest) ProtoMessage()
func (*GithubAuthRequest) Reset ¶
func (m *GithubAuthRequest) Reset()
func (*GithubAuthRequest) String ¶
func (m *GithubAuthRequest) String() string
func (*GithubAuthRequest) XXX_DiscardUnknown ¶
func (m *GithubAuthRequest) XXX_DiscardUnknown()
func (*GithubAuthRequest) XXX_Marshal ¶
func (m *GithubAuthRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GithubAuthRequest) XXX_Merge ¶
func (m *GithubAuthRequest) XXX_Merge(src proto.Message)
func (*GithubAuthRequest) XXX_Size ¶
func (m *GithubAuthRequest) XXX_Size() int
func (*GithubAuthRequest) XXX_Unmarshal ¶
func (m *GithubAuthRequest) XXX_Unmarshal(b []byte) error
type GithubAuthResponse ¶
type GithubAuthResponse struct { Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` User *User `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*GithubAuthResponse) Descriptor ¶
func (*GithubAuthResponse) Descriptor() ([]byte, []int)
func (*GithubAuthResponse) GetToken ¶
func (m *GithubAuthResponse) GetToken() string
func (*GithubAuthResponse) GetUser ¶
func (m *GithubAuthResponse) GetUser() *User
func (*GithubAuthResponse) ProtoMessage ¶
func (*GithubAuthResponse) ProtoMessage()
func (*GithubAuthResponse) Reset ¶
func (m *GithubAuthResponse) Reset()
func (*GithubAuthResponse) String ¶
func (m *GithubAuthResponse) String() string
func (*GithubAuthResponse) XXX_DiscardUnknown ¶
func (m *GithubAuthResponse) XXX_DiscardUnknown()
func (*GithubAuthResponse) XXX_Marshal ¶
func (m *GithubAuthResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GithubAuthResponse) XXX_Merge ¶
func (m *GithubAuthResponse) XXX_Merge(src proto.Message)
func (*GithubAuthResponse) XXX_Size ¶
func (m *GithubAuthResponse) XXX_Size() int
func (*GithubAuthResponse) XXX_Unmarshal ¶
func (m *GithubAuthResponse) XXX_Unmarshal(b []byte) error
type LoginRequest ¶
type LoginRequest struct { Login string `protobuf:"bytes,1,opt,name=login,proto3" json:"login,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*LoginRequest) Descriptor ¶
func (*LoginRequest) Descriptor() ([]byte, []int)
func (*LoginRequest) GetLogin ¶
func (m *LoginRequest) GetLogin() string
func (*LoginRequest) ProtoMessage ¶
func (*LoginRequest) ProtoMessage()
func (*LoginRequest) Reset ¶
func (m *LoginRequest) Reset()
func (*LoginRequest) String ¶
func (m *LoginRequest) String() string
func (*LoginRequest) XXX_DiscardUnknown ¶
func (m *LoginRequest) XXX_DiscardUnknown()
func (*LoginRequest) XXX_Marshal ¶
func (m *LoginRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*LoginRequest) XXX_Merge ¶
func (m *LoginRequest) XXX_Merge(src proto.Message)
func (*LoginRequest) XXX_Size ¶
func (m *LoginRequest) XXX_Size() int
func (*LoginRequest) XXX_Unmarshal ¶
func (m *LoginRequest) XXX_Unmarshal(b []byte) error
type TotalUsersResponse ¶
type TotalUsersResponse struct { Total int32 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*TotalUsersResponse) Descriptor ¶
func (*TotalUsersResponse) Descriptor() ([]byte, []int)
func (*TotalUsersResponse) GetTotal ¶
func (m *TotalUsersResponse) GetTotal() int32
func (*TotalUsersResponse) ProtoMessage ¶
func (*TotalUsersResponse) ProtoMessage()
func (*TotalUsersResponse) Reset ¶
func (m *TotalUsersResponse) Reset()
func (*TotalUsersResponse) String ¶
func (m *TotalUsersResponse) String() string
func (*TotalUsersResponse) XXX_DiscardUnknown ¶
func (m *TotalUsersResponse) XXX_DiscardUnknown()
func (*TotalUsersResponse) XXX_Marshal ¶
func (m *TotalUsersResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*TotalUsersResponse) XXX_Merge ¶
func (m *TotalUsersResponse) XXX_Merge(src proto.Message)
func (*TotalUsersResponse) XXX_Size ¶
func (m *TotalUsersResponse) XXX_Size() int
func (*TotalUsersResponse) XXX_Unmarshal ¶
func (m *TotalUsersResponse) XXX_Unmarshal(b []byte) error
type User ¶
type User struct { GithubLogin string `protobuf:"bytes,1,opt,name=github_login,json=githubLogin,proto3" json:"github_login,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Avatar string `protobuf:"bytes,3,opt,name=avatar,proto3" json:"avatar,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*User) Descriptor ¶
func (*User) GetGithubLogin ¶
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) XXX_DiscardUnknown ¶
func (m *User) XXX_DiscardUnknown()
func (*User) XXX_Unmarshal ¶
type UserResponse ¶
type UserResponse struct { User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*UserResponse) Descriptor ¶
func (*UserResponse) Descriptor() ([]byte, []int)
func (*UserResponse) GetUser ¶
func (m *UserResponse) GetUser() *User
func (*UserResponse) ProtoMessage ¶
func (*UserResponse) ProtoMessage()
func (*UserResponse) Reset ¶
func (m *UserResponse) Reset()
func (*UserResponse) String ¶
func (m *UserResponse) String() string
func (*UserResponse) XXX_DiscardUnknown ¶
func (m *UserResponse) XXX_DiscardUnknown()
func (*UserResponse) XXX_Marshal ¶
func (m *UserResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*UserResponse) XXX_Merge ¶
func (m *UserResponse) XXX_Merge(src proto.Message)
func (*UserResponse) XXX_Size ¶
func (m *UserResponse) XXX_Size() int
func (*UserResponse) XXX_Unmarshal ¶
func (m *UserResponse) XXX_Unmarshal(b []byte) error
type UserServerClient ¶
type UserServerClient interface { Me(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*UserResponse, error) TotalUsers(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*TotalUsersResponse, error) AllUsers(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*AllUsersResponse, error) User(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*UserResponse, error) GithubAuth(ctx context.Context, in *GithubAuthRequest, opts ...grpc.CallOption) (*GithubAuthResponse, error) }
UserServerClient is the client API for UserServer service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewUserServerClient ¶
func NewUserServerClient(cc *grpc.ClientConn) UserServerClient
type UserServerServer ¶
type UserServerServer interface { Me(context.Context, *empty.Empty) (*UserResponse, error) TotalUsers(context.Context, *empty.Empty) (*TotalUsersResponse, error) AllUsers(context.Context, *empty.Empty) (*AllUsersResponse, error) User(context.Context, *LoginRequest) (*UserResponse, error) GithubAuth(context.Context, *GithubAuthRequest) (*GithubAuthResponse, error) }
UserServerServer is the server API for UserServer service.
Click to show internal directories.
Click to hide internal directories.