pbmap

package
Version: v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 21, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var E_DartPackage = &proto.ExtensionDesc{
	ExtendedType:  (*descriptor.FileOptions)(nil),
	ExtensionType: (*string)(nil),
	Field:         97454431,
	Name:          "pbmap.dart_package",
	Tag:           "bytes,97454431,opt,name=dart_package",
	Filename:      "pbmap.proto",
}
View Source
var E_MethodMap = &proto.ExtensionDesc{
	ExtendedType:  (*descriptor.MethodOptions)(nil),
	ExtensionType: (*MethodMap)(nil),
	Field:         87654321,
	Name:          "pbmap.method_map",
	Tag:           "bytes,87654321,opt,name=method_map",
	Filename:      "pbmap.proto",
}
View Source
var E_QueryMap = &proto.ExtensionDesc{
	ExtendedType:  (*descriptor.MessageOptions)(nil),
	ExtensionType: (*QueryMap)(nil),
	Field:         9813242,
	Name:          "pbmap.query_map",
	Tag:           "bytes,9813242,opt,name=query_map",
	Filename:      "pbmap.proto",
}
View Source
var E_ServiceMap = &proto.ExtensionDesc{
	ExtendedType:  (*descriptor.ServiceOptions)(nil),
	ExtensionType: (*ServiceMap)(nil),
	Field:         87654323,
	Name:          "pbmap.service_map",
	Tag:           "bytes,87654323,opt,name=service_map",
	Filename:      "pbmap.proto",
}

Functions

This section is empty.

Types

type Filter

type Filter struct {
	Query                string   `protobuf:"bytes,1,opt,name=Query,proto3" json:"Query,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Filter) Descriptor

func (*Filter) Descriptor() ([]byte, []int)

func (*Filter) GetQuery

func (m *Filter) GetQuery() string

func (*Filter) ProtoMessage

func (*Filter) ProtoMessage()

func (*Filter) Reset

func (m *Filter) Reset()

func (*Filter) String

func (m *Filter) String() string

func (*Filter) XXX_DiscardUnknown

func (m *Filter) XXX_DiscardUnknown()

func (*Filter) XXX_Marshal

func (m *Filter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Filter) XXX_Merge

func (m *Filter) XXX_Merge(src proto.Message)

func (*Filter) XXX_Size

func (m *Filter) XXX_Size() int

func (*Filter) XXX_Unmarshal

func (m *Filter) XXX_Unmarshal(b []byte) error

type MethodMap

type MethodMap struct {
	// "GET", "PUT", "POST", "DELETE"
	Method string `protobuf:"bytes,1,opt,name=method,proto3" json:"method,omitempty"`
	// Format "a/b/c/:d/:e" - a/b/c are fixed in the path, :d and :e are paramaters mapped to fields D, E in the underlying GRPC Request
	// Has to be compatible with Julian Schmidt's HTTP Router
	Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"`
	// Format "key1=:var1&key=:var2" They keys will be mapped to the variables var1, var2 of the unterlying GRPC Request
	QueryString          string   `protobuf:"bytes,3,opt,name=query_string,json=queryString,proto3" json:"query_string,omitempty"`
	Body                 string   `protobuf:"bytes,4,opt,name=body,proto3" json:"body,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

MethodMap gives the parameters how to Map a GRPC Service Method to an REST Endpoint

func (*MethodMap) Descriptor

func (*MethodMap) Descriptor() ([]byte, []int)

func (*MethodMap) GetBody

func (m *MethodMap) GetBody() string

func (*MethodMap) GetMethod

func (m *MethodMap) GetMethod() string

func (*MethodMap) GetPath

func (m *MethodMap) GetPath() string

func (*MethodMap) GetQueryString

func (m *MethodMap) GetQueryString() string

func (*MethodMap) ProtoMessage

func (*MethodMap) ProtoMessage()

func (*MethodMap) Reset

func (m *MethodMap) Reset()

func (*MethodMap) String

func (m *MethodMap) String() string

func (*MethodMap) XXX_DiscardUnknown

func (m *MethodMap) XXX_DiscardUnknown()

func (*MethodMap) XXX_Marshal

func (m *MethodMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MethodMap) XXX_Merge

func (m *MethodMap) XXX_Merge(src proto.Message)

func (*MethodMap) XXX_Size

func (m *MethodMap) XXX_Size() int

func (*MethodMap) XXX_Unmarshal

func (m *MethodMap) XXX_Unmarshal(b []byte) error

type Page

type Page struct {
	Limit                uint64   `protobuf:"varint,1,opt,name=Limit,proto3" json:"Limit,omitempty"`
	Offset               uint64   `protobuf:"varint,2,opt,name=Offset,proto3" json:"Offset,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Page provides information from the query string which you can use to get a larger collection of objects pagewise

func (*Page) Descriptor

func (*Page) Descriptor() ([]byte, []int)

func (*Page) GetLimit

func (m *Page) GetLimit() uint64

func (*Page) GetOffset

func (m *Page) GetOffset() uint64

func (*Page) ProtoMessage

func (*Page) ProtoMessage()

func (*Page) Reset

func (m *Page) Reset()

func (*Page) String

func (m *Page) String() string

func (*Page) XXX_DiscardUnknown

func (m *Page) XXX_DiscardUnknown()

func (*Page) XXX_Marshal

func (m *Page) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Page) XXX_Merge

func (m *Page) XXX_Merge(src proto.Message)

func (*Page) XXX_Size

func (m *Page) XXX_Size() int

func (*Page) XXX_Unmarshal

func (m *Page) XXX_Unmarshal(b []byte) error

type QueryMap

type QueryMap struct {
	Query                string   `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

If an Submessage of an Request-Message in Protobuf has a field (directly at the moment, deeper nesting is not supported at the moment), then additional parameters defined in query (similar to the querystring syntax of your rest-framework) will be added to the queryString documentation and mapped automatically to the objects

func (*QueryMap) Descriptor

func (*QueryMap) Descriptor() ([]byte, []int)

func (*QueryMap) GetQuery

func (m *QueryMap) GetQuery() string

func (*QueryMap) ProtoMessage

func (*QueryMap) ProtoMessage()

func (*QueryMap) Reset

func (m *QueryMap) Reset()

func (*QueryMap) String

func (m *QueryMap) String() string

func (*QueryMap) XXX_DiscardUnknown

func (m *QueryMap) XXX_DiscardUnknown()

func (*QueryMap) XXX_Marshal

func (m *QueryMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryMap) XXX_Merge

func (m *QueryMap) XXX_Merge(src proto.Message)

func (*QueryMap) XXX_Size

func (m *QueryMap) XXX_Size() int

func (*QueryMap) XXX_Unmarshal

func (m *QueryMap) XXX_Unmarshal(b []byte) error

type ServiceMap

type ServiceMap struct {
	Version              string   `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
	BaseUri              string   `protobuf:"bytes,2,opt,name=base_uri,json=baseUri,proto3" json:"base_uri,omitempty"`
	TargetPackage        string   `protobuf:"bytes,3,opt,name=target_package,json=targetPackage,proto3" json:"target_package,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

ServiceMap provides information for how to map an GRPC Service to an REST Service

func (*ServiceMap) Descriptor

func (*ServiceMap) Descriptor() ([]byte, []int)

func (*ServiceMap) GetBaseUri

func (m *ServiceMap) GetBaseUri() string

func (*ServiceMap) GetTargetPackage

func (m *ServiceMap) GetTargetPackage() string

func (*ServiceMap) GetVersion

func (m *ServiceMap) GetVersion() string

func (*ServiceMap) ProtoMessage

func (*ServiceMap) ProtoMessage()

func (*ServiceMap) Reset

func (m *ServiceMap) Reset()

func (*ServiceMap) String

func (m *ServiceMap) String() string

func (*ServiceMap) XXX_DiscardUnknown

func (m *ServiceMap) XXX_DiscardUnknown()

func (*ServiceMap) XXX_Marshal

func (m *ServiceMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ServiceMap) XXX_Merge

func (m *ServiceMap) XXX_Merge(src proto.Message)

func (*ServiceMap) XXX_Size

func (m *ServiceMap) XXX_Size() int

func (*ServiceMap) XXX_Unmarshal

func (m *ServiceMap) XXX_Unmarshal(b []byte) error

type Sort

type Sort struct {
	Field                string   `protobuf:"bytes,1,opt,name=Field,proto3" json:"Field,omitempty"`
	Desc                 bool     `protobuf:"varint,2,opt,name=Desc,proto3" json:"Desc,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Sort provides information from the query string on how to sort a given collection of objects

func (*Sort) Descriptor

func (*Sort) Descriptor() ([]byte, []int)

func (*Sort) GetDesc

func (m *Sort) GetDesc() bool

func (*Sort) GetField

func (m *Sort) GetField() string

func (*Sort) ProtoMessage

func (*Sort) ProtoMessage()

func (*Sort) Reset

func (m *Sort) Reset()

func (*Sort) String

func (m *Sort) String() string

func (*Sort) XXX_DiscardUnknown

func (m *Sort) XXX_DiscardUnknown()

func (*Sort) XXX_Marshal

func (m *Sort) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Sort) XXX_Merge

func (m *Sort) XXX_Merge(src proto.Message)

func (*Sort) XXX_Size

func (m *Sort) XXX_Size() int

func (*Sort) XXX_Unmarshal

func (m *Sort) XXX_Unmarshal(b []byte) error

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL