Documentation ¶
Overview ¶
Package epicstorecommunicator is a generated twirp stub package. This code was generated with github.com/twitchtv/twirp/protoc-gen-twirp v5.10.2.
It is generated from these files:
rpc/epicstorecommunicator/service.proto
Index ¶
- Constants
- Variables
- func WriteError(resp http.ResponseWriter, err error)
- type EmptyReq
- type EpicStoreCommunicator
- type EpicStoreGame
- func (*EpicStoreGame) Descriptor() ([]byte, []int)deprecated
- func (x *EpicStoreGame) GetImageUrl() string
- func (x *EpicStoreGame) GetName() string
- func (x *EpicStoreGame) GetPromoEndDate() string
- func (*EpicStoreGame) ProtoMessage()
- func (x *EpicStoreGame) ProtoReflect() protoreflect.Message
- func (x *EpicStoreGame) Reset()
- func (x *EpicStoreGame) String() string
- type FreeEpicStoreGamesResp
- func (*FreeEpicStoreGamesResp) Descriptor() ([]byte, []int)deprecated
- func (x *FreeEpicStoreGamesResp) GetGames() []*EpicStoreGame
- func (*FreeEpicStoreGamesResp) ProtoMessage()
- func (x *FreeEpicStoreGamesResp) ProtoReflect() protoreflect.Message
- func (x *FreeEpicStoreGamesResp) Reset()
- func (x *FreeEpicStoreGamesResp) String() string
- type HTTPClient
- type IsAliveResp
- type TwirpServer
Constants ¶
const EpicStoreCommunicatorPathPrefix = "/twirp/dennisssdev.yoink.epicstorecommunicator.EpicStoreCommunicator/"
EpicStoreCommunicatorPathPrefix is used for all URL paths on a twirp EpicStoreCommunicator server. Requests are always: POST EpicStoreCommunicatorPathPrefix/method It can be used in an HTTP mux to route twirp requests along with non-twirp requests on other routes.
Variables ¶
var File_rpc_epicstorecommunicator_service_proto protoreflect.FileDescriptor
Functions ¶
func WriteError ¶
func WriteError(resp http.ResponseWriter, err error)
WriteError writes an HTTP response with a valid Twirp error format (code, msg, meta). Useful outside of the Twirp server (e.g. http middleware), but does not trigger hooks. If err is not a twirp.Error, it will get wrapped with twirp.InternalErrorWith(err)
Types ¶
type EmptyReq ¶
type EmptyReq struct {
// contains filtered or unexported fields
}
func (*EmptyReq) Descriptor
deprecated
func (*EmptyReq) ProtoMessage ¶
func (*EmptyReq) ProtoMessage()
func (*EmptyReq) ProtoReflect ¶
func (x *EmptyReq) ProtoReflect() protoreflect.Message
type EpicStoreCommunicator ¶
type EpicStoreCommunicator interface { PingForFreeGames(context.Context, *EmptyReq) (*FreeEpicStoreGamesResp, error) IsAlive(context.Context, *EmptyReq) (*IsAliveResp, error) }
func NewEpicStoreCommunicatorJSONClient ¶
func NewEpicStoreCommunicatorJSONClient(addr string, client HTTPClient, opts ...twirp.ClientOption) EpicStoreCommunicator
NewEpicStoreCommunicatorJSONClient creates a JSON client that implements the EpicStoreCommunicator interface. It communicates using JSON and can be configured with a custom HTTPClient.
func NewEpicStoreCommunicatorProtobufClient ¶
func NewEpicStoreCommunicatorProtobufClient(addr string, client HTTPClient, opts ...twirp.ClientOption) EpicStoreCommunicator
NewEpicStoreCommunicatorProtobufClient creates a Protobuf client that implements the EpicStoreCommunicator interface. It communicates using Protobuf and can be configured with a custom HTTPClient.
type EpicStoreGame ¶
type EpicStoreGame struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` ImageUrl string `protobuf:"bytes,2,opt,name=imageUrl,proto3" json:"imageUrl,omitempty"` PromoEndDate string `protobuf:"bytes,3,opt,name=promoEndDate,proto3" json:"promoEndDate,omitempty"` // contains filtered or unexported fields }
func (*EpicStoreGame) Descriptor
deprecated
func (*EpicStoreGame) Descriptor() ([]byte, []int)
Deprecated: Use EpicStoreGame.ProtoReflect.Descriptor instead.
func (*EpicStoreGame) GetImageUrl ¶
func (x *EpicStoreGame) GetImageUrl() string
func (*EpicStoreGame) GetName ¶
func (x *EpicStoreGame) GetName() string
func (*EpicStoreGame) GetPromoEndDate ¶
func (x *EpicStoreGame) GetPromoEndDate() string
func (*EpicStoreGame) ProtoMessage ¶
func (*EpicStoreGame) ProtoMessage()
func (*EpicStoreGame) ProtoReflect ¶
func (x *EpicStoreGame) ProtoReflect() protoreflect.Message
func (*EpicStoreGame) Reset ¶
func (x *EpicStoreGame) Reset()
func (*EpicStoreGame) String ¶
func (x *EpicStoreGame) String() string
type FreeEpicStoreGamesResp ¶
type FreeEpicStoreGamesResp struct { Games []*EpicStoreGame `protobuf:"bytes,1,rep,name=games,proto3" json:"games,omitempty"` // contains filtered or unexported fields }
func (*FreeEpicStoreGamesResp) Descriptor
deprecated
func (*FreeEpicStoreGamesResp) Descriptor() ([]byte, []int)
Deprecated: Use FreeEpicStoreGamesResp.ProtoReflect.Descriptor instead.
func (*FreeEpicStoreGamesResp) GetGames ¶
func (x *FreeEpicStoreGamesResp) GetGames() []*EpicStoreGame
func (*FreeEpicStoreGamesResp) ProtoMessage ¶
func (*FreeEpicStoreGamesResp) ProtoMessage()
func (*FreeEpicStoreGamesResp) ProtoReflect ¶
func (x *FreeEpicStoreGamesResp) ProtoReflect() protoreflect.Message
func (*FreeEpicStoreGamesResp) Reset ¶
func (x *FreeEpicStoreGamesResp) Reset()
func (*FreeEpicStoreGamesResp) String ¶
func (x *FreeEpicStoreGamesResp) String() string
type HTTPClient ¶
HTTPClient is the interface used by generated clients to send HTTP requests. It is fulfilled by *(net/http).Client, which is sufficient for most users. Users can provide their own implementation for special retry policies.
HTTPClient implementations should not follow redirects. Redirects are automatically disabled if *(net/http).Client is passed to client constructors. See the withoutRedirects function in this file for more details.
type IsAliveResp ¶
type IsAliveResp struct { Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` // contains filtered or unexported fields }
func (*IsAliveResp) Descriptor
deprecated
func (*IsAliveResp) Descriptor() ([]byte, []int)
Deprecated: Use IsAliveResp.ProtoReflect.Descriptor instead.
func (*IsAliveResp) GetStatus ¶
func (x *IsAliveResp) GetStatus() string
func (*IsAliveResp) ProtoMessage ¶
func (*IsAliveResp) ProtoMessage()
func (*IsAliveResp) ProtoReflect ¶
func (x *IsAliveResp) ProtoReflect() protoreflect.Message
func (*IsAliveResp) Reset ¶
func (x *IsAliveResp) Reset()
func (*IsAliveResp) String ¶
func (x *IsAliveResp) String() string
type TwirpServer ¶
type TwirpServer interface { http.Handler // ServiceDescriptor returns gzipped bytes describing the .proto file that // this service was generated from. Once unzipped, the bytes can be // unmarshalled as a // github.com/golang/protobuf/protoc-gen-go/descriptor.FileDescriptorProto. // // The returned integer is the index of this particular service within that // FileDescriptorProto's 'Service' slice of ServiceDescriptorProtos. This is a // low-level field, expected to be used for reflection. ServiceDescriptor() ([]byte, int) // ProtocGenTwirpVersion is the semantic version string of the version of // twirp used to generate this file. ProtocGenTwirpVersion() string // PathPrefix returns the HTTP URL path prefix for all methods handled by this // service. This can be used with an HTTP mux to route twirp requests // alongside non-twirp requests on one HTTP listener. PathPrefix() string }
TwirpServer is the interface generated server structs will support: they're HTTP handlers with additional methods for accessing metadata about the service. Those accessors are a low-level API for building reflection tools. Most people can think of TwirpServers as just http.Handlers.
func NewEpicStoreCommunicatorServer ¶
func NewEpicStoreCommunicatorServer(svc EpicStoreCommunicator, hooks *twirp.ServerHooks) TwirpServer