Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Model ¶
type Model struct { errorhandling.Accumulator ProtoInfo pbinfo.Info Services []*Service }
Model is a data model encapsulating the relevant information for a REST-proto transcoding for various services defined via annotated protocol buffers.
func (*Model) AddService ¶
AddService adds `service` to this Service.
type RESTBinding ¶
type RESTBinding struct { // Index of the binding for this method. Since methods could contain multiple bindings, we // will need a way to identify each binding uniquely. Index int // The name of the method for which this is a binding. ProtoMethod string // The URL pattern of the binding. RESTPattern *RESTRequestPattern // The fields in the request body: either none (empty string), a single field (top-level // request field, non-dotted), or all not captured in the URL ("*"). BodyField string }
RESTBinding encapsulates the information contained in a protocol buffer HTTP annotation.
func (*RESTBinding) String ¶
func (binding *RESTBinding) String() string
String returns a string representation of this RESTBinding.
type RESTRequestPattern ¶
RESTRequestPattern encapsulates the information in an individual REST binding within an HTTP annotation.
func (*RESTRequestPattern) String ¶
func (binding *RESTRequestPattern) String() string
String returns a string representation of this RESTRequestPattern.
type Service ¶
type Service struct { Descriptor *descriptorpb.ServiceDescriptorProto // maybe not needed Name string TypeName string RESTBindings []*RESTBinding }
Service is a data model encapsulating the information relevant to REST-proto transcoding about a proto-defined service.
func (*Service) AddBinding ¶
func (service *Service) AddBinding(binding *RESTBinding)
AddBinding adds a RESTBinding to this Service.