Documentation ¶
Overview ¶
Package myanimelist is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- func RegisterMyAnimeListHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterMyAnimeListHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MyAnimeListClient) error
- func RegisterMyAnimeListHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterMyAnimeListServer(s *grpc.Server, srv MyAnimeListServer)
- type MyAnimeListClient
- type MyAnimeListServer
- type PingReply
- func (*PingReply) Descriptor() ([]byte, []int)
- func (m *PingReply) GetMessage() string
- func (*PingReply) ProtoMessage()
- func (m *PingReply) Reset()
- func (m *PingReply) String() string
- func (m *PingReply) XXX_DiscardUnknown()
- func (m *PingReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PingReply) XXX_Merge(src proto.Message)
- func (m *PingReply) XXX_Size() int
- func (m *PingReply) XXX_Unmarshal(b []byte) error
- type PingRequest
- func (*PingRequest) Descriptor() ([]byte, []int)
- func (m *PingRequest) GetMessage() string
- func (*PingRequest) ProtoMessage()
- func (m *PingRequest) Reset()
- func (m *PingRequest) String() string
- func (m *PingRequest) XXX_DiscardUnknown()
- func (m *PingRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PingRequest) XXX_Merge(src proto.Message)
- func (m *PingRequest) XXX_Size() int
- func (m *PingRequest) XXX_Unmarshal(b []byte) error
- type UnimplementedMyAnimeListServer
- func (*UnimplementedMyAnimeListServer) GetAnimeByID(ctx context.Context, req *message.AnimeID) (*message.Anime, error)
- func (*UnimplementedMyAnimeListServer) GetAnimeByLink(ctx context.Context, req *message.AnimeLink) (*message.Anime, error)
- func (*UnimplementedMyAnimeListServer) GetUserAnimeList(ctx context.Context, req *message.Username) (*message.UserAnimeList, error)
- func (*UnimplementedMyAnimeListServer) Ping(ctx context.Context, req *PingRequest) (*PingReply, error)
- func (*UnimplementedMyAnimeListServer) SearchAnime(ctx context.Context, req *message.SearchQuery) (*message.AnimeSearchResults, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterMyAnimeListHandler ¶
func RegisterMyAnimeListHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterMyAnimeListHandler registers the http handlers for service MyAnimeList to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterMyAnimeListHandlerClient ¶
func RegisterMyAnimeListHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MyAnimeListClient) error
RegisterMyAnimeListHandlerClient registers the http handlers for service MyAnimeList to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "MyAnimeListClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "MyAnimeListClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "MyAnimeListClient" to call the correct interceptors.
func RegisterMyAnimeListHandlerFromEndpoint ¶
func RegisterMyAnimeListHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterMyAnimeListHandlerFromEndpoint is same as RegisterMyAnimeListHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterMyAnimeListServer ¶
func RegisterMyAnimeListServer(s *grpc.Server, srv MyAnimeListServer)
Types ¶
type MyAnimeListClient ¶
type MyAnimeListClient interface { Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingReply, error) GetUserAnimeList(ctx context.Context, in *message.Username, opts ...grpc.CallOption) (*message.UserAnimeList, error) SearchAnime(ctx context.Context, in *message.SearchQuery, opts ...grpc.CallOption) (*message.AnimeSearchResults, error) GetAnimeByLink(ctx context.Context, in *message.AnimeLink, opts ...grpc.CallOption) (*message.Anime, error) GetAnimeByID(ctx context.Context, in *message.AnimeID, opts ...grpc.CallOption) (*message.Anime, error) }
MyAnimeListClient is the client API for MyAnimeList service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewMyAnimeListClient ¶
func NewMyAnimeListClient(cc *grpc.ClientConn) MyAnimeListClient
type MyAnimeListServer ¶
type MyAnimeListServer interface { Ping(context.Context, *PingRequest) (*PingReply, error) GetUserAnimeList(context.Context, *message.Username) (*message.UserAnimeList, error) SearchAnime(context.Context, *message.SearchQuery) (*message.AnimeSearchResults, error) GetAnimeByLink(context.Context, *message.AnimeLink) (*message.Anime, error) GetAnimeByID(context.Context, *message.AnimeID) (*message.Anime, error) }
MyAnimeListServer is the server API for MyAnimeList service.
type PingReply ¶
type PingReply struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*PingReply) Descriptor ¶
func (*PingReply) GetMessage ¶
func (*PingReply) ProtoMessage ¶
func (*PingReply) ProtoMessage()
func (*PingReply) XXX_DiscardUnknown ¶
func (m *PingReply) XXX_DiscardUnknown()
func (*PingReply) XXX_Marshal ¶
func (*PingReply) XXX_Unmarshal ¶
type PingRequest ¶
type PingRequest struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*PingRequest) Descriptor ¶
func (*PingRequest) Descriptor() ([]byte, []int)
func (*PingRequest) GetMessage ¶
func (m *PingRequest) GetMessage() string
func (*PingRequest) ProtoMessage ¶
func (*PingRequest) ProtoMessage()
func (*PingRequest) Reset ¶
func (m *PingRequest) Reset()
func (*PingRequest) String ¶
func (m *PingRequest) String() string
func (*PingRequest) XXX_DiscardUnknown ¶
func (m *PingRequest) XXX_DiscardUnknown()
func (*PingRequest) XXX_Marshal ¶
func (m *PingRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PingRequest) XXX_Merge ¶
func (m *PingRequest) XXX_Merge(src proto.Message)
func (*PingRequest) XXX_Size ¶
func (m *PingRequest) XXX_Size() int
func (*PingRequest) XXX_Unmarshal ¶
func (m *PingRequest) XXX_Unmarshal(b []byte) error
type UnimplementedMyAnimeListServer ¶
type UnimplementedMyAnimeListServer struct { }
UnimplementedMyAnimeListServer can be embedded to have forward compatible implementations.
func (*UnimplementedMyAnimeListServer) GetAnimeByID ¶
func (*UnimplementedMyAnimeListServer) GetAnimeByLink ¶
func (*UnimplementedMyAnimeListServer) GetUserAnimeList ¶
func (*UnimplementedMyAnimeListServer) GetUserAnimeList(ctx context.Context, req *message.Username) (*message.UserAnimeList, error)
func (*UnimplementedMyAnimeListServer) Ping ¶
func (*UnimplementedMyAnimeListServer) Ping(ctx context.Context, req *PingRequest) (*PingReply, error)
func (*UnimplementedMyAnimeListServer) SearchAnime ¶
func (*UnimplementedMyAnimeListServer) SearchAnime(ctx context.Context, req *message.SearchQuery) (*message.AnimeSearchResults, error)