Documentation ¶
Overview ¶
Package e2e is a generated twirp stub package. This code was generated with github.com/twitchtv/twirp/protoc-gen-twirp v5.10.1.
It is generated from these files:
service.proto
Index ¶
- Constants
- Variables
- func WriteError(resp http.ResponseWriter, err error)
- type BreadReq
- func (*BreadReq) Descriptor() ([]byte, []int)
- func (m *BreadReq) GetCount() int64
- func (*BreadReq) ProtoMessage()
- func (m *BreadReq) Reset()
- func (m *BreadReq) String() string
- func (m *BreadReq) XXX_DiscardUnknown()
- func (m *BreadReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *BreadReq) XXX_Merge(src proto.Message)
- func (m *BreadReq) XXX_Size() int
- func (m *BreadReq) XXX_Unmarshal(b []byte) error
- type BreadResp
- func (*BreadResp) Descriptor() ([]byte, []int)
- func (m *BreadResp) GetAnswer() isBreadResp_Answer
- func (m *BreadResp) GetName() string
- func (m *BreadResp) GetToasted() bool
- func (*BreadResp) ProtoMessage()
- func (m *BreadResp) Reset()
- func (m *BreadResp) String() string
- func (m *BreadResp) XXX_DiscardUnknown()
- func (m *BreadResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *BreadResp) XXX_Merge(src proto.Message)
- func (*BreadResp) XXX_OneofWrappers() []interface{}
- func (m *BreadResp) XXX_Size() int
- func (m *BreadResp) XXX_Unmarshal(b []byte) error
- type BreadResp_Name
- type BreadResp_Toasted
- type ChangeMeReq
- func (*ChangeMeReq) Descriptor() ([]byte, []int)
- func (m *ChangeMeReq) GetName() string
- func (m *ChangeMeReq) GetPrevious() map[string]*ChangeMeResp
- func (*ChangeMeReq) ProtoMessage()
- func (m *ChangeMeReq) Reset()
- func (m *ChangeMeReq) String() string
- func (m *ChangeMeReq) XXX_DiscardUnknown()
- func (m *ChangeMeReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ChangeMeReq) XXX_Merge(src proto.Message)
- func (m *ChangeMeReq) XXX_Size() int
- func (m *ChangeMeReq) XXX_Unmarshal(b []byte) error
- type ChangeMeResp
- func (*ChangeMeResp) Descriptor() ([]byte, []int)
- func (m *ChangeMeResp) GetAnswer() isChangeMeResp_Answer
- func (m *ChangeMeResp) GetChanged() bool
- func (m *ChangeMeResp) GetName() string
- func (m *ChangeMeResp) GetNewName() string
- func (m *ChangeMeResp) GetPrevious() map[string]*ChangeMeResp
- func (*ChangeMeResp) ProtoMessage()
- func (m *ChangeMeResp) Reset()
- func (m *ChangeMeResp) String() string
- func (m *ChangeMeResp) XXX_DiscardUnknown()
- func (m *ChangeMeResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ChangeMeResp) XXX_Merge(src proto.Message)
- func (*ChangeMeResp) XXX_OneofWrappers() []interface{}
- func (m *ChangeMeResp) XXX_Size() int
- func (m *ChangeMeResp) XXX_Unmarshal(b []byte) error
- type ChangeMeResp_Changed
- type ChangeMeResp_NewName
- type HTTPClient
- type HelloReq
- func (*HelloReq) Descriptor() ([]byte, []int)
- func (m *HelloReq) GetName() string
- func (*HelloReq) ProtoMessage()
- func (m *HelloReq) Reset()
- func (m *HelloReq) String() string
- func (m *HelloReq) XXX_DiscardUnknown()
- func (m *HelloReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *HelloReq) XXX_Merge(src proto.Message)
- func (m *HelloReq) XXX_Size() int
- func (m *HelloReq) XXX_Unmarshal(b []byte) error
- type HelloResp
- func (*HelloResp) Descriptor() ([]byte, []int)
- func (m *HelloResp) GetText() string
- func (*HelloResp) ProtoMessage()
- func (m *HelloResp) Reset()
- func (m *HelloResp) String() string
- func (m *HelloResp) XXX_DiscardUnknown()
- func (m *HelloResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *HelloResp) XXX_Merge(src proto.Message)
- func (m *HelloResp) XXX_Size() int
- func (m *HelloResp) XXX_Unmarshal(b []byte) error
- type PaintersReq
- func (*PaintersReq) Descriptor() ([]byte, []int)
- func (*PaintersReq) ProtoMessage()
- func (m *PaintersReq) Reset()
- func (m *PaintersReq) String() string
- func (m *PaintersReq) XXX_DiscardUnknown()
- func (m *PaintersReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PaintersReq) XXX_Merge(src proto.Message)
- func (m *PaintersReq) XXX_Size() int
- func (m *PaintersReq) XXX_Unmarshal(b []byte) error
- type PaintersResp
- func (*PaintersResp) Descriptor() ([]byte, []int)
- func (m *PaintersResp) GetAllPainters() []string
- func (m *PaintersResp) GetBestPainter() *painters.Painter
- func (*PaintersResp) ProtoMessage()
- func (m *PaintersResp) Reset()
- func (m *PaintersResp) String() string
- func (m *PaintersResp) XXX_DiscardUnknown()
- func (m *PaintersResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PaintersResp) XXX_Merge(src proto.Message)
- func (m *PaintersResp) XXX_Size() int
- func (m *PaintersResp) XXX_Unmarshal(b []byte) error
- type Service
- type TrafficJamReq
- func (*TrafficJamReq) Descriptor() ([]byte, []int)
- func (m *TrafficJamReq) GetColor() TrafficLight
- func (m *TrafficJamReq) GetTrafficLights() []TrafficLight
- func (*TrafficJamReq) ProtoMessage()
- func (m *TrafficJamReq) Reset()
- func (m *TrafficJamReq) String() string
- func (m *TrafficJamReq) XXX_DiscardUnknown()
- func (m *TrafficJamReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TrafficJamReq) XXX_Merge(src proto.Message)
- func (m *TrafficJamReq) XXX_Size() int
- func (m *TrafficJamReq) XXX_Unmarshal(b []byte) error
- type TrafficJamResp
- func (*TrafficJamResp) Descriptor() ([]byte, []int)
- func (m *TrafficJamResp) GetNext() TrafficLight
- func (*TrafficJamResp) ProtoMessage()
- func (m *TrafficJamResp) Reset()
- func (m *TrafficJamResp) String() string
- func (m *TrafficJamResp) XXX_DiscardUnknown()
- func (m *TrafficJamResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TrafficJamResp) XXX_Merge(src proto.Message)
- func (m *TrafficJamResp) XXX_Size() int
- func (m *TrafficJamResp) XXX_Unmarshal(b []byte) error
- type TrafficLight
- type TranslateReq
- func (*TranslateReq) Descriptor() ([]byte, []int)
- func (m *TranslateReq) GetWords() map[string]*Word
- func (*TranslateReq) ProtoMessage()
- func (m *TranslateReq) Reset()
- func (m *TranslateReq) String() string
- func (m *TranslateReq) XXX_DiscardUnknown()
- func (m *TranslateReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TranslateReq) XXX_Merge(src proto.Message)
- func (m *TranslateReq) XXX_Size() int
- func (m *TranslateReq) XXX_Unmarshal(b []byte) error
- type TranslateResp
- func (*TranslateResp) Descriptor() ([]byte, []int)
- func (m *TranslateResp) GetTranslations() map[string]*Word
- func (*TranslateResp) ProtoMessage()
- func (m *TranslateResp) Reset()
- func (m *TranslateResp) String() string
- func (m *TranslateResp) XXX_DiscardUnknown()
- func (m *TranslateResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TranslateResp) XXX_Merge(src proto.Message)
- func (m *TranslateResp) XXX_Size() int
- func (m *TranslateResp) XXX_Unmarshal(b []byte) error
- type TwirpServer
- type Word
- func (*Word) Descriptor() ([]byte, []int)
- func (m *Word) GetLanguage() string
- func (m *Word) GetWord() string
- func (*Word) ProtoMessage()
- func (m *Word) Reset()
- func (m *Word) String() string
- func (m *Word) XXX_DiscardUnknown()
- func (m *Word) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Word) XXX_Merge(src proto.Message)
- func (m *Word) XXX_Size() int
- func (m *Word) XXX_Unmarshal(b []byte) error
Constants ¶
const ServicePathPrefix = "/twirp/e2e.Service/"
ServicePathPrefix is used for all URL paths on a twirp Service server. Requests are always: POST ServicePathPrefix/method It can be used in an HTTP mux to route twirp requests along with non-twirp requests on other routes.
Variables ¶
var TrafficLight_name = map[int32]string{
0: "RED",
1: "YELLOW",
2: "GREEN",
}
var TrafficLight_value = map[string]int32{
"RED": 0,
"YELLOW": 1,
"GREEN": 2,
}
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 BreadReq ¶
type BreadReq struct { Count int64 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*BreadReq) Descriptor ¶
func (*BreadReq) ProtoMessage ¶
func (*BreadReq) ProtoMessage()
func (*BreadReq) XXX_DiscardUnknown ¶
func (m *BreadReq) XXX_DiscardUnknown()
func (*BreadReq) XXX_Marshal ¶
func (*BreadReq) XXX_Unmarshal ¶
type BreadResp ¶
type BreadResp struct { // Types that are valid to be assigned to Answer: // *BreadResp_Name // *BreadResp_Toasted Answer isBreadResp_Answer `protobuf_oneof:"answer"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*BreadResp) Descriptor ¶
func (*BreadResp) GetToasted ¶
func (*BreadResp) ProtoMessage ¶
func (*BreadResp) ProtoMessage()
func (*BreadResp) XXX_DiscardUnknown ¶
func (m *BreadResp) XXX_DiscardUnknown()
func (*BreadResp) XXX_Marshal ¶
func (*BreadResp) XXX_OneofWrappers ¶
func (*BreadResp) XXX_OneofWrappers() []interface{}
XXX_OneofWrappers is for the internal use of the proto package.
func (*BreadResp) XXX_Unmarshal ¶
type BreadResp_Name ¶
type BreadResp_Name struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3,oneof"`
}
type BreadResp_Toasted ¶
type BreadResp_Toasted struct {
Toasted bool `protobuf:"varint,2,opt,name=toasted,proto3,oneof"`
}
type ChangeMeReq ¶
type ChangeMeReq struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Previous map[string]*ChangeMeResp `` /* 157-byte string literal not displayed */ XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ChangeMeReq) Descriptor ¶
func (*ChangeMeReq) Descriptor() ([]byte, []int)
func (*ChangeMeReq) GetName ¶
func (m *ChangeMeReq) GetName() string
func (*ChangeMeReq) GetPrevious ¶
func (m *ChangeMeReq) GetPrevious() map[string]*ChangeMeResp
func (*ChangeMeReq) ProtoMessage ¶
func (*ChangeMeReq) ProtoMessage()
func (*ChangeMeReq) Reset ¶
func (m *ChangeMeReq) Reset()
func (*ChangeMeReq) String ¶
func (m *ChangeMeReq) String() string
func (*ChangeMeReq) XXX_DiscardUnknown ¶
func (m *ChangeMeReq) XXX_DiscardUnknown()
func (*ChangeMeReq) XXX_Marshal ¶
func (m *ChangeMeReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ChangeMeReq) XXX_Merge ¶
func (m *ChangeMeReq) XXX_Merge(src proto.Message)
func (*ChangeMeReq) XXX_Size ¶
func (m *ChangeMeReq) XXX_Size() int
func (*ChangeMeReq) XXX_Unmarshal ¶
func (m *ChangeMeReq) XXX_Unmarshal(b []byte) error
type ChangeMeResp ¶
type ChangeMeResp struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Types that are valid to be assigned to Answer: // *ChangeMeResp_NewName // *ChangeMeResp_Changed Answer isChangeMeResp_Answer `protobuf_oneof:"answer"` Previous map[string]*ChangeMeResp `` /* 157-byte string literal not displayed */ XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ChangeMeResp) Descriptor ¶
func (*ChangeMeResp) Descriptor() ([]byte, []int)
func (*ChangeMeResp) GetAnswer ¶
func (m *ChangeMeResp) GetAnswer() isChangeMeResp_Answer
func (*ChangeMeResp) GetChanged ¶
func (m *ChangeMeResp) GetChanged() bool
func (*ChangeMeResp) GetName ¶
func (m *ChangeMeResp) GetName() string
func (*ChangeMeResp) GetNewName ¶
func (m *ChangeMeResp) GetNewName() string
func (*ChangeMeResp) GetPrevious ¶
func (m *ChangeMeResp) GetPrevious() map[string]*ChangeMeResp
func (*ChangeMeResp) ProtoMessage ¶
func (*ChangeMeResp) ProtoMessage()
func (*ChangeMeResp) Reset ¶
func (m *ChangeMeResp) Reset()
func (*ChangeMeResp) String ¶
func (m *ChangeMeResp) String() string
func (*ChangeMeResp) XXX_DiscardUnknown ¶
func (m *ChangeMeResp) XXX_DiscardUnknown()
func (*ChangeMeResp) XXX_Marshal ¶
func (m *ChangeMeResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ChangeMeResp) XXX_Merge ¶
func (m *ChangeMeResp) XXX_Merge(src proto.Message)
func (*ChangeMeResp) XXX_OneofWrappers ¶
func (*ChangeMeResp) XXX_OneofWrappers() []interface{}
XXX_OneofWrappers is for the internal use of the proto package.
func (*ChangeMeResp) XXX_Size ¶
func (m *ChangeMeResp) XXX_Size() int
func (*ChangeMeResp) XXX_Unmarshal ¶
func (m *ChangeMeResp) XXX_Unmarshal(b []byte) error
type ChangeMeResp_Changed ¶
type ChangeMeResp_Changed struct {
Changed bool `protobuf:"varint,3,opt,name=changed,proto3,oneof"`
}
type ChangeMeResp_NewName ¶
type ChangeMeResp_NewName struct {
NewName string `protobuf:"bytes,2,opt,name=newName,proto3,oneof"`
}
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 HelloReq ¶
type HelloReq struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*HelloReq) Descriptor ¶
func (*HelloReq) ProtoMessage ¶
func (*HelloReq) ProtoMessage()
func (*HelloReq) XXX_DiscardUnknown ¶
func (m *HelloReq) XXX_DiscardUnknown()
func (*HelloReq) XXX_Marshal ¶
func (*HelloReq) XXX_Unmarshal ¶
type HelloResp ¶
type HelloResp struct { Text string `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*HelloResp) Descriptor ¶
func (*HelloResp) ProtoMessage ¶
func (*HelloResp) ProtoMessage()
func (*HelloResp) XXX_DiscardUnknown ¶
func (m *HelloResp) XXX_DiscardUnknown()
func (*HelloResp) XXX_Marshal ¶
func (*HelloResp) XXX_Unmarshal ¶
type PaintersReq ¶
type PaintersReq struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*PaintersReq) Descriptor ¶
func (*PaintersReq) Descriptor() ([]byte, []int)
func (*PaintersReq) ProtoMessage ¶
func (*PaintersReq) ProtoMessage()
func (*PaintersReq) Reset ¶
func (m *PaintersReq) Reset()
func (*PaintersReq) String ¶
func (m *PaintersReq) String() string
func (*PaintersReq) XXX_DiscardUnknown ¶
func (m *PaintersReq) XXX_DiscardUnknown()
func (*PaintersReq) XXX_Marshal ¶
func (m *PaintersReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PaintersReq) XXX_Merge ¶
func (m *PaintersReq) XXX_Merge(src proto.Message)
func (*PaintersReq) XXX_Size ¶
func (m *PaintersReq) XXX_Size() int
func (*PaintersReq) XXX_Unmarshal ¶
func (m *PaintersReq) XXX_Unmarshal(b []byte) error
type PaintersResp ¶
type PaintersResp struct { BestPainter *painters.Painter `protobuf:"bytes,1,opt,name=bestPainter,proto3" json:"bestPainter,omitempty"` AllPainters []string `protobuf:"bytes,2,rep,name=allPainters,proto3" json:"allPainters,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*PaintersResp) Descriptor ¶
func (*PaintersResp) Descriptor() ([]byte, []int)
func (*PaintersResp) GetAllPainters ¶
func (m *PaintersResp) GetAllPainters() []string
func (*PaintersResp) GetBestPainter ¶
func (m *PaintersResp) GetBestPainter() *painters.Painter
func (*PaintersResp) ProtoMessage ¶
func (*PaintersResp) ProtoMessage()
func (*PaintersResp) Reset ¶
func (m *PaintersResp) Reset()
func (*PaintersResp) String ¶
func (m *PaintersResp) String() string
func (*PaintersResp) XXX_DiscardUnknown ¶
func (m *PaintersResp) XXX_DiscardUnknown()
func (*PaintersResp) XXX_Marshal ¶
func (m *PaintersResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PaintersResp) XXX_Merge ¶
func (m *PaintersResp) XXX_Merge(src proto.Message)
func (*PaintersResp) XXX_Size ¶
func (m *PaintersResp) XXX_Size() int
func (*PaintersResp) XXX_Unmarshal ¶
func (m *PaintersResp) XXX_Unmarshal(b []byte) error
type Service ¶
type Service interface { Hello(context.Context, *HelloReq) (*HelloResp, error) TrafficJam(context.Context, *TrafficJamReq) (*TrafficJamResp, error) GetPainters(context.Context, *PaintersReq) (*PaintersResp, error) Translate(context.Context, *TranslateReq) (*TranslateResp, error) Bread(context.Context, *BreadReq) (*BreadResp, error) ChangeMe(context.Context, *ChangeMeReq) (*ChangeMeResp, error) }
func NewServiceJSONClient ¶
func NewServiceJSONClient(addr string, client HTTPClient, opts ...twirp.ClientOption) Service
NewServiceJSONClient creates a JSON client that implements the Service interface. It communicates using JSON and can be configured with a custom HTTPClient.
func NewServiceProtobufClient ¶
func NewServiceProtobufClient(addr string, client HTTPClient, opts ...twirp.ClientOption) Service
NewServiceProtobufClient creates a Protobuf client that implements the Service interface. It communicates using Protobuf and can be configured with a custom HTTPClient.
type TrafficJamReq ¶
type TrafficJamReq struct { Color TrafficLight `protobuf:"varint,1,opt,name=color,proto3,enum=e2e.TrafficLight" json:"color,omitempty"` TrafficLights []TrafficLight `protobuf:"varint,2,rep,packed,name=trafficLights,proto3,enum=e2e.TrafficLight" json:"trafficLights,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*TrafficJamReq) Descriptor ¶
func (*TrafficJamReq) Descriptor() ([]byte, []int)
func (*TrafficJamReq) GetColor ¶
func (m *TrafficJamReq) GetColor() TrafficLight
func (*TrafficJamReq) GetTrafficLights ¶ added in v0.7.0
func (m *TrafficJamReq) GetTrafficLights() []TrafficLight
func (*TrafficJamReq) ProtoMessage ¶
func (*TrafficJamReq) ProtoMessage()
func (*TrafficJamReq) Reset ¶
func (m *TrafficJamReq) Reset()
func (*TrafficJamReq) String ¶
func (m *TrafficJamReq) String() string
func (*TrafficJamReq) XXX_DiscardUnknown ¶
func (m *TrafficJamReq) XXX_DiscardUnknown()
func (*TrafficJamReq) XXX_Marshal ¶
func (m *TrafficJamReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*TrafficJamReq) XXX_Merge ¶
func (m *TrafficJamReq) XXX_Merge(src proto.Message)
func (*TrafficJamReq) XXX_Size ¶
func (m *TrafficJamReq) XXX_Size() int
func (*TrafficJamReq) XXX_Unmarshal ¶
func (m *TrafficJamReq) XXX_Unmarshal(b []byte) error
type TrafficJamResp ¶
type TrafficJamResp struct { Next TrafficLight `protobuf:"varint,1,opt,name=next,proto3,enum=e2e.TrafficLight" json:"next,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*TrafficJamResp) Descriptor ¶
func (*TrafficJamResp) Descriptor() ([]byte, []int)
func (*TrafficJamResp) GetNext ¶
func (m *TrafficJamResp) GetNext() TrafficLight
func (*TrafficJamResp) ProtoMessage ¶
func (*TrafficJamResp) ProtoMessage()
func (*TrafficJamResp) Reset ¶
func (m *TrafficJamResp) Reset()
func (*TrafficJamResp) String ¶
func (m *TrafficJamResp) String() string
func (*TrafficJamResp) XXX_DiscardUnknown ¶
func (m *TrafficJamResp) XXX_DiscardUnknown()
func (*TrafficJamResp) XXX_Marshal ¶
func (m *TrafficJamResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*TrafficJamResp) XXX_Merge ¶
func (m *TrafficJamResp) XXX_Merge(src proto.Message)
func (*TrafficJamResp) XXX_Size ¶
func (m *TrafficJamResp) XXX_Size() int
func (*TrafficJamResp) XXX_Unmarshal ¶
func (m *TrafficJamResp) XXX_Unmarshal(b []byte) error
type TrafficLight ¶
type TrafficLight int32
const ( TrafficLight_RED TrafficLight = 0 TrafficLight_YELLOW TrafficLight = 1 TrafficLight_GREEN TrafficLight = 2 )
func (TrafficLight) EnumDescriptor ¶
func (TrafficLight) EnumDescriptor() ([]byte, []int)
func (TrafficLight) String ¶
func (x TrafficLight) String() string
type TranslateReq ¶
type TranslateReq struct { Words map[string]*Word `` /* 151-byte string literal not displayed */ XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*TranslateReq) Descriptor ¶
func (*TranslateReq) Descriptor() ([]byte, []int)
func (*TranslateReq) GetWords ¶
func (m *TranslateReq) GetWords() map[string]*Word
func (*TranslateReq) ProtoMessage ¶
func (*TranslateReq) ProtoMessage()
func (*TranslateReq) Reset ¶
func (m *TranslateReq) Reset()
func (*TranslateReq) String ¶
func (m *TranslateReq) String() string
func (*TranslateReq) XXX_DiscardUnknown ¶
func (m *TranslateReq) XXX_DiscardUnknown()
func (*TranslateReq) XXX_Marshal ¶
func (m *TranslateReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*TranslateReq) XXX_Merge ¶
func (m *TranslateReq) XXX_Merge(src proto.Message)
func (*TranslateReq) XXX_Size ¶
func (m *TranslateReq) XXX_Size() int
func (*TranslateReq) XXX_Unmarshal ¶
func (m *TranslateReq) XXX_Unmarshal(b []byte) error
type TranslateResp ¶
type TranslateResp struct { Translations map[string]*Word `` /* 165-byte string literal not displayed */ XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*TranslateResp) Descriptor ¶
func (*TranslateResp) Descriptor() ([]byte, []int)
func (*TranslateResp) GetTranslations ¶
func (m *TranslateResp) GetTranslations() map[string]*Word
func (*TranslateResp) ProtoMessage ¶
func (*TranslateResp) ProtoMessage()
func (*TranslateResp) Reset ¶
func (m *TranslateResp) Reset()
func (*TranslateResp) String ¶
func (m *TranslateResp) String() string
func (*TranslateResp) XXX_DiscardUnknown ¶
func (m *TranslateResp) XXX_DiscardUnknown()
func (*TranslateResp) XXX_Marshal ¶
func (m *TranslateResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*TranslateResp) XXX_Merge ¶
func (m *TranslateResp) XXX_Merge(src proto.Message)
func (*TranslateResp) XXX_Size ¶
func (m *TranslateResp) XXX_Size() int
func (*TranslateResp) XXX_Unmarshal ¶
func (m *TranslateResp) XXX_Unmarshal(b []byte) error
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 NewServiceServer ¶
func NewServiceServer(svc Service, hooks *twirp.ServerHooks) TwirpServer
type Word ¶
type Word struct { Word string `protobuf:"bytes,1,opt,name=word,proto3" json:"word,omitempty"` Language string `protobuf:"bytes,2,opt,name=language,proto3" json:"language,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Word) Descriptor ¶
func (*Word) GetLanguage ¶
func (*Word) ProtoMessage ¶
func (*Word) ProtoMessage()
func (*Word) XXX_DiscardUnknown ¶
func (m *Word) XXX_DiscardUnknown()