Documentation ¶
Index ¶
- func InitGRPC()
- func RegisterApiServer(s *grpc.Server, srv ApiServer)
- type ApiClient
- type ApiServer
- type ApiService
- func (s *ApiService) GetServers(ctx context.Context, req *Empty) (*GetServerResponse, error)
- func (s *ApiService) GetTavern(ctx context.Context, req *Empty) (*GetTavernResponse, error)
- func (s *ApiService) GetUserByID(ctx context.Context, req *GetUserRequest) (*User, error)
- func (s *ApiService) GetUserByName(ctx context.Context, req *GetUserRequest) (*User, error)
- func (s *ApiService) Register(ctx context.Context, req *RegisterRequest) (*RegisterResponse, error)
- type Empty
- func (*Empty) Descriptor() ([]byte, []int)
- func (*Empty) ProtoMessage()
- func (m *Empty) Reset()
- func (m *Empty) String() string
- func (m *Empty) XXX_DiscardUnknown()
- func (m *Empty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Empty) XXX_Merge(src proto.Message)
- func (m *Empty) XXX_Size() int
- func (m *Empty) XXX_Unmarshal(b []byte) error
- type GetServerResponse
- func (*GetServerResponse) Descriptor() ([]byte, []int)
- func (m *GetServerResponse) GetServers() []*Server
- func (*GetServerResponse) ProtoMessage()
- func (m *GetServerResponse) Reset()
- func (m *GetServerResponse) String() string
- func (m *GetServerResponse) XXX_DiscardUnknown()
- func (m *GetServerResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GetServerResponse) XXX_Merge(src proto.Message)
- func (m *GetServerResponse) XXX_Size() int
- func (m *GetServerResponse) XXX_Unmarshal(b []byte) error
- type GetTavernResponse
- func (*GetTavernResponse) Descriptor() ([]byte, []int)
- func (m *GetTavernResponse) GetItems() []byte
- func (*GetTavernResponse) ProtoMessage()
- func (m *GetTavernResponse) Reset()
- func (m *GetTavernResponse) String() string
- func (m *GetTavernResponse) XXX_DiscardUnknown()
- func (m *GetTavernResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GetTavernResponse) XXX_Merge(src proto.Message)
- func (m *GetTavernResponse) XXX_Size() int
- func (m *GetTavernResponse) XXX_Unmarshal(b []byte) error
- type GetUserRequest
- func (*GetUserRequest) Descriptor() ([]byte, []int)
- func (m *GetUserRequest) GetId() string
- func (m *GetUserRequest) GetUsername() string
- func (*GetUserRequest) ProtoMessage()
- func (m *GetUserRequest) Reset()
- func (m *GetUserRequest) String() string
- func (m *GetUserRequest) XXX_DiscardUnknown()
- func (m *GetUserRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GetUserRequest) XXX_Merge(src proto.Message)
- func (m *GetUserRequest) XXX_Size() int
- func (m *GetUserRequest) XXX_Unmarshal(b []byte) error
- type RegisterRequest
- func (*RegisterRequest) Descriptor() ([]byte, []int)
- func (m *RegisterRequest) GetMail() string
- func (m *RegisterRequest) GetPassword() string
- func (m *RegisterRequest) GetUsername() string
- func (*RegisterRequest) ProtoMessage()
- func (m *RegisterRequest) Reset()
- func (m *RegisterRequest) String() string
- func (m *RegisterRequest) XXX_DiscardUnknown()
- func (m *RegisterRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RegisterRequest) XXX_Merge(src proto.Message)
- func (m *RegisterRequest) XXX_Size() int
- func (m *RegisterRequest) XXX_Unmarshal(b []byte) error
- type RegisterResponse
- func (*RegisterResponse) Descriptor() ([]byte, []int)
- func (m *RegisterResponse) GetOk() bool
- func (m *RegisterResponse) GetUserID() string
- func (*RegisterResponse) ProtoMessage()
- func (m *RegisterResponse) Reset()
- func (m *RegisterResponse) String() string
- func (m *RegisterResponse) XXX_DiscardUnknown()
- func (m *RegisterResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RegisterResponse) XXX_Merge(src proto.Message)
- func (m *RegisterResponse) XXX_Size() int
- func (m *RegisterResponse) XXX_Unmarshal(b []byte) error
- type Server
- func (*Server) Descriptor() ([]byte, []int)
- func (m *Server) GetMaxplayers() int32
- func (m *Server) GetName() string
- func (m *Server) GetTotalplayers() int32
- func (*Server) ProtoMessage()
- func (m *Server) Reset()
- func (m *Server) String() string
- func (m *Server) XXX_DiscardUnknown()
- func (m *Server) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Server) XXX_Merge(src proto.Message)
- func (m *Server) XXX_Size() int
- func (m *Server) XXX_Unmarshal(b []byte) error
- type User
- func (*User) Descriptor() ([]byte, []int)
- func (m *User) GetCash() int64
- func (m *User) GetCreatedAt() string
- func (m *User) GetDisabledAt() string
- func (m *User) GetId() string
- func (m *User) GetIp() string
- func (m *User) GetMail() string
- func (m *User) GetPassword() string
- func (m *User) GetServer() int32
- func (m *User) GetUsername() string
- func (m *User) GetUsertype() int32
- 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
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterApiServer ¶
Types ¶
type ApiClient ¶
type ApiClient interface { GetUserByName(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*User, error) GetUserByID(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*User, error) Register(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (*RegisterResponse, error) GetServers(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*GetServerResponse, error) GetTavern(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*GetTavernResponse, error) }
ApiClient is the client API for Api service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewApiClient ¶
func NewApiClient(cc *grpc.ClientConn) ApiClient
type ApiServer ¶
type ApiServer interface { GetUserByName(context.Context, *GetUserRequest) (*User, error) GetUserByID(context.Context, *GetUserRequest) (*User, error) Register(context.Context, *RegisterRequest) (*RegisterResponse, error) GetServers(context.Context, *Empty) (*GetServerResponse, error) GetTavern(context.Context, *Empty) (*GetTavernResponse, error) }
ApiServer is the server API for Api service.
type ApiService ¶
type ApiService struct{}
func (*ApiService) GetServers ¶
func (s *ApiService) GetServers(ctx context.Context, req *Empty) (*GetServerResponse, error)
func (*ApiService) GetTavern ¶
func (s *ApiService) GetTavern(ctx context.Context, req *Empty) (*GetTavernResponse, error)
func (*ApiService) GetUserByID ¶
func (s *ApiService) GetUserByID(ctx context.Context, req *GetUserRequest) (*User, error)
func (*ApiService) GetUserByName ¶
func (s *ApiService) GetUserByName(ctx context.Context, req *GetUserRequest) (*User, error)
func (*ApiService) Register ¶
func (s *ApiService) Register(ctx context.Context, req *RegisterRequest) (*RegisterResponse, error)
type Empty ¶
type Empty struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Empty) Descriptor ¶
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
func (*Empty) XXX_DiscardUnknown ¶
func (m *Empty) XXX_DiscardUnknown()
func (*Empty) XXX_Marshal ¶
func (*Empty) XXX_Unmarshal ¶
type GetServerResponse ¶
type GetServerResponse struct { Servers []*Server `protobuf:"bytes,1,rep,name=servers,proto3" json:"servers,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*GetServerResponse) Descriptor ¶
func (*GetServerResponse) Descriptor() ([]byte, []int)
func (*GetServerResponse) GetServers ¶
func (m *GetServerResponse) GetServers() []*Server
func (*GetServerResponse) ProtoMessage ¶
func (*GetServerResponse) ProtoMessage()
func (*GetServerResponse) Reset ¶
func (m *GetServerResponse) Reset()
func (*GetServerResponse) String ¶
func (m *GetServerResponse) String() string
func (*GetServerResponse) XXX_DiscardUnknown ¶
func (m *GetServerResponse) XXX_DiscardUnknown()
func (*GetServerResponse) XXX_Marshal ¶
func (m *GetServerResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GetServerResponse) XXX_Merge ¶
func (m *GetServerResponse) XXX_Merge(src proto.Message)
func (*GetServerResponse) XXX_Size ¶
func (m *GetServerResponse) XXX_Size() int
func (*GetServerResponse) XXX_Unmarshal ¶
func (m *GetServerResponse) XXX_Unmarshal(b []byte) error
type GetTavernResponse ¶
type GetTavernResponse struct { Items []byte `protobuf:"bytes,1,opt,name=items,proto3" json:"items,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*GetTavernResponse) Descriptor ¶
func (*GetTavernResponse) Descriptor() ([]byte, []int)
func (*GetTavernResponse) GetItems ¶
func (m *GetTavernResponse) GetItems() []byte
func (*GetTavernResponse) ProtoMessage ¶
func (*GetTavernResponse) ProtoMessage()
func (*GetTavernResponse) Reset ¶
func (m *GetTavernResponse) Reset()
func (*GetTavernResponse) String ¶
func (m *GetTavernResponse) String() string
func (*GetTavernResponse) XXX_DiscardUnknown ¶
func (m *GetTavernResponse) XXX_DiscardUnknown()
func (*GetTavernResponse) XXX_Marshal ¶
func (m *GetTavernResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GetTavernResponse) XXX_Merge ¶
func (m *GetTavernResponse) XXX_Merge(src proto.Message)
func (*GetTavernResponse) XXX_Size ¶
func (m *GetTavernResponse) XXX_Size() int
func (*GetTavernResponse) XXX_Unmarshal ¶
func (m *GetTavernResponse) XXX_Unmarshal(b []byte) error
type GetUserRequest ¶
type GetUserRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*GetUserRequest) Descriptor ¶
func (*GetUserRequest) Descriptor() ([]byte, []int)
func (*GetUserRequest) GetId ¶
func (m *GetUserRequest) GetId() string
func (*GetUserRequest) GetUsername ¶
func (m *GetUserRequest) GetUsername() string
func (*GetUserRequest) ProtoMessage ¶
func (*GetUserRequest) ProtoMessage()
func (*GetUserRequest) Reset ¶
func (m *GetUserRequest) Reset()
func (*GetUserRequest) String ¶
func (m *GetUserRequest) String() string
func (*GetUserRequest) XXX_DiscardUnknown ¶
func (m *GetUserRequest) XXX_DiscardUnknown()
func (*GetUserRequest) XXX_Marshal ¶
func (m *GetUserRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GetUserRequest) XXX_Merge ¶
func (m *GetUserRequest) XXX_Merge(src proto.Message)
func (*GetUserRequest) XXX_Size ¶
func (m *GetUserRequest) XXX_Size() int
func (*GetUserRequest) XXX_Unmarshal ¶
func (m *GetUserRequest) XXX_Unmarshal(b []byte) error
type RegisterRequest ¶
type RegisterRequest struct { Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` Mail string `protobuf:"bytes,2,opt,name=mail,proto3" json:"mail,omitempty"` Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*RegisterRequest) Descriptor ¶
func (*RegisterRequest) Descriptor() ([]byte, []int)
func (*RegisterRequest) GetMail ¶
func (m *RegisterRequest) GetMail() string
func (*RegisterRequest) GetPassword ¶
func (m *RegisterRequest) GetPassword() string
func (*RegisterRequest) GetUsername ¶
func (m *RegisterRequest) GetUsername() string
func (*RegisterRequest) ProtoMessage ¶
func (*RegisterRequest) ProtoMessage()
func (*RegisterRequest) Reset ¶
func (m *RegisterRequest) Reset()
func (*RegisterRequest) String ¶
func (m *RegisterRequest) String() string
func (*RegisterRequest) XXX_DiscardUnknown ¶
func (m *RegisterRequest) XXX_DiscardUnknown()
func (*RegisterRequest) XXX_Marshal ¶
func (m *RegisterRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*RegisterRequest) XXX_Merge ¶
func (m *RegisterRequest) XXX_Merge(src proto.Message)
func (*RegisterRequest) XXX_Size ¶
func (m *RegisterRequest) XXX_Size() int
func (*RegisterRequest) XXX_Unmarshal ¶
func (m *RegisterRequest) XXX_Unmarshal(b []byte) error
type RegisterResponse ¶
type RegisterResponse struct { Ok bool `protobuf:"varint,1,opt,name=ok,proto3" json:"ok,omitempty"` UserID string `protobuf:"bytes,2,opt,name=userID,proto3" json:"userID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*RegisterResponse) Descriptor ¶
func (*RegisterResponse) Descriptor() ([]byte, []int)
func (*RegisterResponse) GetOk ¶
func (m *RegisterResponse) GetOk() bool
func (*RegisterResponse) GetUserID ¶
func (m *RegisterResponse) GetUserID() string
func (*RegisterResponse) ProtoMessage ¶
func (*RegisterResponse) ProtoMessage()
func (*RegisterResponse) Reset ¶
func (m *RegisterResponse) Reset()
func (*RegisterResponse) String ¶
func (m *RegisterResponse) String() string
func (*RegisterResponse) XXX_DiscardUnknown ¶
func (m *RegisterResponse) XXX_DiscardUnknown()
func (*RegisterResponse) XXX_Marshal ¶
func (m *RegisterResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*RegisterResponse) XXX_Merge ¶
func (m *RegisterResponse) XXX_Merge(src proto.Message)
func (*RegisterResponse) XXX_Size ¶
func (m *RegisterResponse) XXX_Size() int
func (*RegisterResponse) XXX_Unmarshal ¶
func (m *RegisterResponse) XXX_Unmarshal(b []byte) error
type Server ¶
type Server struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Totalplayers int32 `protobuf:"varint,2,opt,name=totalplayers,proto3" json:"totalplayers,omitempty"` Maxplayers int32 `protobuf:"varint,3,opt,name=maxplayers,proto3" json:"maxplayers,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Server) Descriptor ¶
func (*Server) GetMaxplayers ¶
func (*Server) GetTotalplayers ¶
func (*Server) ProtoMessage ¶
func (*Server) ProtoMessage()
func (*Server) XXX_DiscardUnknown ¶
func (m *Server) XXX_DiscardUnknown()
func (*Server) XXX_Marshal ¶
func (*Server) XXX_Unmarshal ¶
type User ¶
type User struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"` Usertype int32 `protobuf:"varint,4,opt,name=usertype,proto3" json:"usertype,omitempty"` Ip string `protobuf:"bytes,5,opt,name=ip,proto3" json:"ip,omitempty"` Server int32 `protobuf:"varint,6,opt,name=server,proto3" json:"server,omitempty"` Cash int64 `protobuf:"varint,7,opt,name=cash,proto3" json:"cash,omitempty"` Mail string `protobuf:"bytes,8,opt,name=mail,proto3" json:"mail,omitempty"` CreatedAt string `protobuf:"bytes,9,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` DisabledAt string `protobuf:"bytes,10,opt,name=disabled_at,json=disabledAt,proto3" json:"disabled_at,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*User) Descriptor ¶
func (*User) GetCreatedAt ¶
func (*User) GetDisabledAt ¶
func (*User) GetPassword ¶
func (*User) GetUsername ¶
func (*User) GetUsertype ¶
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) XXX_DiscardUnknown ¶
func (m *User) XXX_DiscardUnknown()
func (*User) XXX_Unmarshal ¶
Click to show internal directories.
Click to hide internal directories.