example

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2018 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthExample = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowExample   = fmt.Errorf("proto: integer overflow")
)
View Source
var Filtering_Mode_name = map[int32]string{
	0: "EQ",
	1: "NE",
	2: "GT",
	3: "GE",
	4: "LT",
	5: "LE",
	6: "IS_NULL",
	7: "NOT_NULL",
}
View Source
var Filtering_Mode_value = map[string]int32{
	"EQ":       0,
	"NE":       1,
	"GT":       2,
	"GE":       3,
	"LT":       4,
	"LE":       5,
	"IS_NULL":  6,
	"NOT_NULL": 7,
}
View Source
var SortCriteria_Order_name = map[int32]string{
	0: "ASC",
	1: "DESC",
}
View Source
var SortCriteria_Order_value = map[string]int32{
	"ASC":  0,
	"DESC": 1,
}

Functions

func ExampleContains

func ExampleContains() map[string]interface{}

func ExampleFields

func ExampleFields() []string

DefaultFields all fields generated by QueryExample

func ExampleItemContains

func ExampleItemContains() map[string]interface{}

func ExampleItemFields

func ExampleItemFields() []string

DefaultFields all fields generated by QueryExampleItem

func RegisterExampleServiceServer

func RegisterExampleServiceServer(s *grpc.Server, srv ExampleServiceServer)

Types

type Empty

type Empty struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func NewPopulatedEmpty

func NewPopulatedEmpty(r randyExample, easy bool) *Empty

func (*Empty) Descriptor

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

func (*Empty) Equal

func (this *Empty) Equal(that interface{}) bool

func (*Empty) GoString

func (this *Empty) GoString() string

func (*Empty) Marshal

func (m *Empty) Marshal() (dAtA []byte, err error)

func (*Empty) MarshalTo

func (m *Empty) MarshalTo(dAtA []byte) (int, error)

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) Reset

func (m *Empty) Reset()

func (*Empty) Size

func (m *Empty) Size() (n int)

func (*Empty) String

func (this *Empty) String() string

func (*Empty) Unmarshal

func (m *Empty) Unmarshal(dAtA []byte) error

func (*Empty) XXX_DiscardUnknown

func (m *Empty) XXX_DiscardUnknown()

func (*Empty) XXX_Marshal

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

func (*Empty) XXX_Merge

func (dst *Empty) XXX_Merge(src proto.Message)

func (*Empty) XXX_Size

func (m *Empty) XXX_Size() int

func (*Empty) XXX_Unmarshal

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

type Example

type Example struct {
	//    option (sql.opts).gorm = true;
	Id                   int64          `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty" db:"id"`
	CreatedAt            *time.Time     `protobuf:"bytes,2,opt,name=created_at,json=createdAt,stdtime" json:"created_at,omitempty"`
	UpdatedAt            *time.Time     `protobuf:"bytes,3,opt,name=updated_at,json=updatedAt,stdtime" json:"updated_at,omitempty"`
	DeletedAt            *time.Time     `protobuf:"bytes,4,opt,name=deleted_at,json=deletedAt,stdtime" json:"deleted_at,omitempty" db:"deleted_at"`
	Name                 string         `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"`
	Mess                 string         `protobuf:"bytes,6,opt,name=mess,proto3" json:"mess,omitempty"`
	Product              string         `protobuf:"bytes,7,opt,name=product,proto3" json:"product,omitempty"`
	Organization         string         `protobuf:"bytes,8,opt,name=organization,proto3" json:"organization,omitempty"`
	State                string         `protobuf:"bytes,9,opt,name=state,proto3" json:"state,omitempty"`
	Items                []*ExampleItem `protobuf:"bytes,10,rep,name=items" json:"items,omitempty"`
	XXX_NoUnkeyedLiteral struct{}       `json:"-"`
	XXX_unrecognized     []byte         `json:"-"`
	XXX_sizecache        int32          `json:"-"`
}

func ConvertExampleFromType

func ConvertExampleFromType(from ExampleType) (Example, error)

ConvertExampleFromType takes an orm object and returns a pb object

func NewPopulatedExample

func NewPopulatedExample(r randyExample, easy bool) *Example

func (*Example) Descriptor

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

func (*Example) Equal

func (this *Example) Equal(that interface{}) bool

func (*Example) GetCreatedAt

func (m *Example) GetCreatedAt() *time.Time

func (*Example) GetDeletedAt

func (m *Example) GetDeletedAt() *time.Time

func (*Example) GetId

func (m *Example) GetId() int64

func (*Example) GetItems

func (m *Example) GetItems() []*ExampleItem

func (*Example) GetMess

func (m *Example) GetMess() string

func (*Example) GetName

func (m *Example) GetName() string

func (*Example) GetOrganization

func (m *Example) GetOrganization() string

func (*Example) GetProduct

func (m *Example) GetProduct() string

func (*Example) GetState

func (m *Example) GetState() string

func (*Example) GetUpdatedAt

func (m *Example) GetUpdatedAt() *time.Time

func (*Example) GoString

func (this *Example) GoString() string

func (*Example) Marshal

func (m *Example) Marshal() (dAtA []byte, err error)

func (*Example) MarshalTo

func (m *Example) MarshalTo(dAtA []byte) (int, error)

func (*Example) ProtoMessage

func (*Example) ProtoMessage()

func (*Example) Reset

func (m *Example) Reset()

func (*Example) Size

func (m *Example) Size() (n int)

func (*Example) String

func (this *Example) String() string

func (*Example) Unmarshal

func (m *Example) Unmarshal(dAtA []byte) error

func (*Example) XXX_DiscardUnknown

func (m *Example) XXX_DiscardUnknown()

func (*Example) XXX_Marshal

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

func (*Example) XXX_Merge

func (dst *Example) XXX_Merge(src proto.Message)

func (*Example) XXX_Size

func (m *Example) XXX_Size() int

func (*Example) XXX_Unmarshal

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

type ExampleItem

type ExampleItem struct {
	//    option (sql.opts).gorm = true;
	Id                   int64      `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty" db:"id"`
	CreatedAt            *time.Time `protobuf:"bytes,2,opt,name=created_at,json=createdAt,stdtime" json:"created_at,omitempty"`
	UpdatedAt            *time.Time `protobuf:"bytes,3,opt,name=updated_at,json=updatedAt,stdtime" json:"updated_at,omitempty"`
	DeletedAt            *time.Time `protobuf:"bytes,4,opt,name=deleted_at,json=deletedAt,stdtime" json:"deleted_at,omitempty" db:"deleted_at"`
	Name                 string     `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"`
	Mess                 string     `protobuf:"bytes,6,opt,name=mess,proto3" json:"mess,omitempty"`
	MoveID               int64      `protobuf:"varint,7,opt,name=move_id,json=moveId,proto3" json:"move_id,omitempty"`
	XXX_NoUnkeyedLiteral struct{}   `json:"-"`
	XXX_unrecognized     []byte     `json:"-"`
	XXX_sizecache        int32      `json:"-"`
}

func ConvertExampleItemFromType

func ConvertExampleItemFromType(from ExampleItemType) (ExampleItem, error)

ConvertExampleItemFromType takes an orm object and returns a pb object

func NewPopulatedExampleItem

func NewPopulatedExampleItem(r randyExample, easy bool) *ExampleItem

func (*ExampleItem) Descriptor

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

func (*ExampleItem) Equal

func (this *ExampleItem) Equal(that interface{}) bool

func (*ExampleItem) GetCreatedAt

func (m *ExampleItem) GetCreatedAt() *time.Time

func (*ExampleItem) GetDeletedAt

func (m *ExampleItem) GetDeletedAt() *time.Time

func (*ExampleItem) GetId

func (m *ExampleItem) GetId() int64

func (*ExampleItem) GetMess

func (m *ExampleItem) GetMess() string

func (*ExampleItem) GetMoveID

func (m *ExampleItem) GetMoveID() int64

func (*ExampleItem) GetName

func (m *ExampleItem) GetName() string

func (*ExampleItem) GetUpdatedAt

func (m *ExampleItem) GetUpdatedAt() *time.Time

func (*ExampleItem) GoString

func (this *ExampleItem) GoString() string

func (*ExampleItem) Marshal

func (m *ExampleItem) Marshal() (dAtA []byte, err error)

func (*ExampleItem) MarshalTo

func (m *ExampleItem) MarshalTo(dAtA []byte) (int, error)

func (*ExampleItem) ProtoMessage

func (*ExampleItem) ProtoMessage()

func (*ExampleItem) Reset

func (m *ExampleItem) Reset()

func (*ExampleItem) Size

func (m *ExampleItem) Size() (n int)

func (*ExampleItem) String

func (this *ExampleItem) String() string

func (*ExampleItem) Unmarshal

func (m *ExampleItem) Unmarshal(dAtA []byte) error

func (*ExampleItem) XXX_DiscardUnknown

func (m *ExampleItem) XXX_DiscardUnknown()

func (*ExampleItem) XXX_Marshal

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

func (*ExampleItem) XXX_Merge

func (dst *ExampleItem) XXX_Merge(src proto.Message)

func (*ExampleItem) XXX_Size

func (m *ExampleItem) XXX_Size() int

func (*ExampleItem) XXX_Unmarshal

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

type ExampleItemType

type ExampleItemType struct {
	ID        int64
	CreatedAt *time.Time
	UpdatedAt *time.Time
	DeletedAt *time.Time
	Name      string `db:"name"`
	// Skipping field: Mess
	MoveID int64 `db:"device_id"`
}

ExampleItemType no comment was provided for message type

func ConvertExampleItemToType

func ConvertExampleItemToType(from ExampleItem) (ExampleItemType, error)

ConvertExampleItemToType takes a pb object and returns an orm object

type ExampleServiceClient

type ExampleServiceClient interface {
	Read(ctx context.Context, in *Query, opts ...grpc.CallOption) (*Response, error)
	List(ctx context.Context, in *Query, opts ...grpc.CallOption) (*ResponseList, error)
	Create(ctx context.Context, in *Mutation, opts ...grpc.CallOption) (*MutationResponse, error)
	Update(ctx context.Context, in *Mutation, opts ...grpc.CallOption) (*Empty, error)
}

ExampleServiceClient is the client API for ExampleService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewExampleServiceClient

func NewExampleServiceClient(cc *grpc.ClientConn) ExampleServiceClient

type ExampleServiceServer

type ExampleServiceServer interface {
	Read(context.Context, *Query) (*Response, error)
	List(context.Context, *Query) (*ResponseList, error)
	Create(context.Context, *Mutation) (*MutationResponse, error)
	Update(context.Context, *Mutation) (*Empty, error)
}

ExampleServiceServer is the server API for ExampleService service.

type ExampleType

type ExampleType struct {
	ID        int64
	CreatedAt *time.Time
	UpdatedAt *time.Time
	DeletedAt *time.Time
	Name      string `db:"name"`
	// Skipping field: Mess
	Product      string
	Organization string `db:"organization_id"`
	State        string
	Items        []*ExampleItem
}

ExampleType no comment was provided for message type

func ConvertExampleToType

func ConvertExampleToType(from Example) (ExampleType, error)

ConvertExampleToType takes a pb object and returns an orm object

type Filtering

type Filtering struct {
	Name                 string         `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Mode                 Filtering_Mode `protobuf:"varint,2,opt,name=mode,proto3,enum=example.Filtering_Mode" json:"mode,omitempty"`
	Value                string         `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
	XXX_NoUnkeyedLiteral struct{}       `json:"-"`
	XXX_unrecognized     []byte         `json:"-"`
	XXX_sizecache        int32          `json:"-"`
}

func NewPopulatedFiltering

func NewPopulatedFiltering(r randyExample, easy bool) *Filtering

func (*Filtering) Descriptor

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

func (*Filtering) Equal

func (this *Filtering) Equal(that interface{}) bool

func (*Filtering) GetMode

func (m *Filtering) GetMode() Filtering_Mode

func (*Filtering) GetName

func (m *Filtering) GetName() string

func (*Filtering) GetValue

func (m *Filtering) GetValue() string

func (*Filtering) GoString

func (this *Filtering) GoString() string

func (*Filtering) Marshal

func (m *Filtering) Marshal() (dAtA []byte, err error)

func (*Filtering) MarshalTo

func (m *Filtering) MarshalTo(dAtA []byte) (int, error)

func (*Filtering) ProtoMessage

func (*Filtering) ProtoMessage()

func (*Filtering) Reset

func (m *Filtering) Reset()

func (*Filtering) Size

func (m *Filtering) Size() (n int)

func (*Filtering) String

func (this *Filtering) String() string

func (*Filtering) Unmarshal

func (m *Filtering) Unmarshal(dAtA []byte) error

func (*Filtering) XXX_DiscardUnknown

func (m *Filtering) XXX_DiscardUnknown()

func (*Filtering) XXX_Marshal

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

func (*Filtering) XXX_Merge

func (dst *Filtering) XXX_Merge(src proto.Message)

func (*Filtering) XXX_Size

func (m *Filtering) XXX_Size() int

func (*Filtering) XXX_Unmarshal

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

type Filtering_Mode

type Filtering_Mode int32
const (
	// EQ in sql =
	EQ Filtering_Mode = 0
	// NE  in sql !=
	NE Filtering_Mode = 1
	// GT in sql >
	GT Filtering_Mode = 2
	// GE in sql >=
	GE Filtering_Mode = 3
	// LT in sql <
	LT Filtering_Mode = 4
	// LE in sql <=
	LE Filtering_Mode = 5
	// IS_NULL in sql IS NULL
	IS_NULL Filtering_Mode = 6
	// NOT_NULL in sql IS NOT NULL
	NOT_NULL Filtering_Mode = 7
)

func (Filtering_Mode) EnumDescriptor

func (Filtering_Mode) EnumDescriptor() ([]byte, []int)

func (Filtering_Mode) String

func (x Filtering_Mode) String() string

type Mutation

type Mutation struct {
	Id                   string           `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Fields               []*MutationField `protobuf:"bytes,8,rep,name=fields" json:"fields,omitempty"`
	XXX_NoUnkeyedLiteral struct{}         `json:"-"`
	XXX_unrecognized     []byte           `json:"-"`
	XXX_sizecache        int32            `json:"-"`
}

func NewPopulatedMutation

func NewPopulatedMutation(r randyExample, easy bool) *Mutation

func (*Mutation) Descriptor

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

func (*Mutation) Equal

func (this *Mutation) Equal(that interface{}) bool

func (*Mutation) GetFields

func (m *Mutation) GetFields() []*MutationField

func (*Mutation) GetId

func (m *Mutation) GetId() string

func (*Mutation) GoString

func (this *Mutation) GoString() string

func (*Mutation) Marshal

func (m *Mutation) Marshal() (dAtA []byte, err error)

func (*Mutation) MarshalTo

func (m *Mutation) MarshalTo(dAtA []byte) (int, error)

func (*Mutation) ProtoMessage

func (*Mutation) ProtoMessage()

func (*Mutation) Reset

func (m *Mutation) Reset()

func (*Mutation) Size

func (m *Mutation) Size() (n int)

func (*Mutation) String

func (this *Mutation) String() string

func (*Mutation) Unmarshal

func (m *Mutation) Unmarshal(dAtA []byte) error

func (*Mutation) XXX_DiscardUnknown

func (m *Mutation) XXX_DiscardUnknown()

func (*Mutation) XXX_Marshal

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

func (*Mutation) XXX_Merge

func (dst *Mutation) XXX_Merge(src proto.Message)

func (*Mutation) XXX_Size

func (m *Mutation) XXX_Size() int

func (*Mutation) XXX_Unmarshal

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

type MutationField

type MutationField struct {
	Name                 string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Value                string   `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func NewPopulatedMutationField

func NewPopulatedMutationField(r randyExample, easy bool) *MutationField

func (*MutationField) Descriptor

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

func (*MutationField) Equal

func (this *MutationField) Equal(that interface{}) bool

func (*MutationField) GetName

func (m *MutationField) GetName() string

func (*MutationField) GetValue

func (m *MutationField) GetValue() string

func (*MutationField) GoString

func (this *MutationField) GoString() string

func (*MutationField) Marshal

func (m *MutationField) Marshal() (dAtA []byte, err error)

func (*MutationField) MarshalTo

func (m *MutationField) MarshalTo(dAtA []byte) (int, error)

func (*MutationField) ProtoMessage

func (*MutationField) ProtoMessage()

func (*MutationField) Reset

func (m *MutationField) Reset()

func (*MutationField) Size

func (m *MutationField) Size() (n int)

func (*MutationField) String

func (this *MutationField) String() string

func (*MutationField) Unmarshal

func (m *MutationField) Unmarshal(dAtA []byte) error

func (*MutationField) XXX_DiscardUnknown

func (m *MutationField) XXX_DiscardUnknown()

func (*MutationField) XXX_Marshal

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

func (*MutationField) XXX_Merge

func (dst *MutationField) XXX_Merge(src proto.Message)

func (*MutationField) XXX_Size

func (m *MutationField) XXX_Size() int

func (*MutationField) XXX_Unmarshal

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

type MutationResponse

type MutationResponse struct {
	Id                   int64    `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func NewPopulatedMutationResponse

func NewPopulatedMutationResponse(r randyExample, easy bool) *MutationResponse

func (*MutationResponse) Descriptor

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

func (*MutationResponse) Equal

func (this *MutationResponse) Equal(that interface{}) bool

func (*MutationResponse) GetId

func (m *MutationResponse) GetId() int64

func (*MutationResponse) GoString

func (this *MutationResponse) GoString() string

func (*MutationResponse) Marshal

func (m *MutationResponse) Marshal() (dAtA []byte, err error)

func (*MutationResponse) MarshalTo

func (m *MutationResponse) MarshalTo(dAtA []byte) (int, error)

func (*MutationResponse) ProtoMessage

func (*MutationResponse) ProtoMessage()

func (*MutationResponse) Reset

func (m *MutationResponse) Reset()

func (*MutationResponse) Size

func (m *MutationResponse) Size() (n int)

func (*MutationResponse) String

func (this *MutationResponse) String() string

func (*MutationResponse) Unmarshal

func (m *MutationResponse) Unmarshal(dAtA []byte) error

func (*MutationResponse) XXX_DiscardUnknown

func (m *MutationResponse) XXX_DiscardUnknown()

func (*MutationResponse) XXX_Marshal

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

func (*MutationResponse) XXX_Merge

func (dst *MutationResponse) XXX_Merge(src proto.Message)

func (*MutationResponse) XXX_Size

func (m *MutationResponse) XXX_Size() int

func (*MutationResponse) XXX_Unmarshal

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

type PageInfo

type PageInfo struct {
	Current int64 `protobuf:"varint,1,opt,name=current,proto3" json:"current,omitempty"`
	// The service may optionally include the total number of resources being paged.
	Size_ int64 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"`
	// The service may optionally include the offset of the next page of resources.
	// A null value indicates no more pages.
	Offset               int64    `protobuf:"varint,3,opt,name=offset,proto3" json:"offset,omitempty"`
	Limit                int64    `protobuf:"varint,4,opt,name=limit,proto3" json:"limit,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func NewPopulatedPageInfo

func NewPopulatedPageInfo(r randyExample, easy bool) *PageInfo

func (*PageInfo) Descriptor

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

func (*PageInfo) Equal

func (this *PageInfo) Equal(that interface{}) bool

func (*PageInfo) GetCurrent

func (m *PageInfo) GetCurrent() int64

func (*PageInfo) GetLimit

func (m *PageInfo) GetLimit() int64

func (*PageInfo) GetOffset

func (m *PageInfo) GetOffset() int64

func (*PageInfo) GetSize_

func (m *PageInfo) GetSize_() int64

func (*PageInfo) GoString

func (this *PageInfo) GoString() string

func (*PageInfo) Marshal

func (m *PageInfo) Marshal() (dAtA []byte, err error)

func (*PageInfo) MarshalTo

func (m *PageInfo) MarshalTo(dAtA []byte) (int, error)

func (*PageInfo) ProtoMessage

func (*PageInfo) ProtoMessage()

func (*PageInfo) Reset

func (m *PageInfo) Reset()

func (*PageInfo) Size

func (m *PageInfo) Size() (n int)

func (*PageInfo) String

func (this *PageInfo) String() string

func (*PageInfo) Unmarshal

func (m *PageInfo) Unmarshal(dAtA []byte) error

func (*PageInfo) XXX_DiscardUnknown

func (m *PageInfo) XXX_DiscardUnknown()

func (*PageInfo) XXX_Marshal

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

func (*PageInfo) XXX_Merge

func (dst *PageInfo) XXX_Merge(src proto.Message)

func (*PageInfo) XXX_Size

func (m *PageInfo) XXX_Size() int

func (*PageInfo) XXX_Unmarshal

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

type Query

type Query struct {
	Id  string   `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Ids []string `protobuf:"bytes,2,rep,name=ids" json:"ids,omitempty"`
	// Types that are valid to be assigned to Params:
	//	*Query_Page
	//	*Query_First
	//	*Query_Last
	Params               isQuery_Params `protobuf_oneof:"params"`
	Limit                int64          `protobuf:"varint,6,opt,name=limit,proto3" json:"limit,omitempty"`
	Filter               []*Filtering   `protobuf:"bytes,7,rep,name=filter" json:"filter,omitempty"`
	Field                []string       `protobuf:"bytes,8,rep,name=field" json:"field,omitempty"`
	XXX_NoUnkeyedLiteral struct{}       `json:"-"`
	XXX_unrecognized     []byte         `json:"-"`
	XXX_sizecache        int32          `json:"-"`
}

func NewPopulatedQuery

func NewPopulatedQuery(r randyExample, easy bool) *Query

func (*Query) Descriptor

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

func (*Query) Equal

func (this *Query) Equal(that interface{}) bool

func (*Query) GetField

func (m *Query) GetField() []string

func (*Query) GetFilter

func (m *Query) GetFilter() []*Filtering

func (*Query) GetFirst

func (m *Query) GetFirst() int64

func (*Query) GetId

func (m *Query) GetId() string

func (*Query) GetIds

func (m *Query) GetIds() []string

func (*Query) GetLast

func (m *Query) GetLast() int64

func (*Query) GetLimit

func (m *Query) GetLimit() int64

func (*Query) GetPage

func (m *Query) GetPage() int64

func (*Query) GetParams

func (m *Query) GetParams() isQuery_Params

func (*Query) GoString

func (this *Query) GoString() string

func (*Query) Marshal

func (m *Query) Marshal() (dAtA []byte, err error)

func (*Query) MarshalTo

func (m *Query) MarshalTo(dAtA []byte) (int, error)

func (*Query) ProtoMessage

func (*Query) ProtoMessage()

func (*Query) Reset

func (m *Query) Reset()

func (*Query) Size

func (m *Query) Size() (n int)

func (*Query) String

func (this *Query) String() string

func (*Query) Unmarshal

func (m *Query) Unmarshal(dAtA []byte) error

func (*Query) XXX_DiscardUnknown

func (m *Query) XXX_DiscardUnknown()

func (*Query) XXX_Marshal

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

func (*Query) XXX_Merge

func (dst *Query) XXX_Merge(src proto.Message)

func (*Query) XXX_OneofFuncs

func (*Query) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

func (*Query) XXX_Size

func (m *Query) XXX_Size() int

func (*Query) XXX_Unmarshal

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

type QueryExample

type QueryExample struct {
	Verbose int
	DB      *sqlx.DB
	// contains filtered or unexported fields
}

func NewQueryExample

func NewQueryExample(verbose int) *QueryExample

NewQueryExample - initialize QueryExample

func (*QueryExample) BuildMultiQuery

func (p *QueryExample) BuildMultiQuery(in *Query, field string) (string, []interface{})

BuildMultiQuery - return rows

func (*QueryExample) BuildOneQuery

func (p *QueryExample) BuildOneQuery(in *Query, field string) (string, []interface{})

BuildOneQuery - return one row

func (*QueryExample) BuildQuery

func (p *QueryExample) BuildQuery(in *Query, f string, reserved bool, one bool) (string, []interface{})

func (*QueryExample) Close

func (p *QueryExample) Close() error

Close closes the database, releasing any open resources.

func (*QueryExample) ContainsField

func (p *QueryExample) ContainsField(item string) bool

func (*QueryExample) Count

func (p *QueryExample) Count(in *Query) int64

func (*QueryExample) DefaultFields

func (p *QueryExample) DefaultFields() string

DefaultFields all fields generated by QueryExample

func (*QueryExample) Scan

func (p *QueryExample) Scan(val interface{}) error

func (*QueryExample) SetDB

func (p *QueryExample) SetDB(db *sqlx.DB)

SetDB setting database

func (*QueryExample) TableName

func (p *QueryExample) TableName() string

TableName overrides the default tablename generated by QueryExample

func (*QueryExample) Value

func (p *QueryExample) Value() (driver.Value, error)

type QueryExampleItem

type QueryExampleItem struct {
	Verbose int
	DB      *sqlx.DB
	// contains filtered or unexported fields
}

func NewQueryExampleItem

func NewQueryExampleItem(verbose int) *QueryExampleItem

NewQueryExampleItem - initialize QueryExampleItem

func (*QueryExampleItem) BuildMultiQuery

func (p *QueryExampleItem) BuildMultiQuery(in *Query, field string) (string, []interface{})

BuildMultiQuery - return rows

func (*QueryExampleItem) BuildOneQuery

func (p *QueryExampleItem) BuildOneQuery(in *Query, field string) (string, []interface{})

BuildOneQuery - return one row

func (*QueryExampleItem) BuildQuery

func (p *QueryExampleItem) BuildQuery(in *Query, f string, reserved bool, one bool) (string, []interface{})

func (*QueryExampleItem) Close

func (p *QueryExampleItem) Close() error

Close closes the database, releasing any open resources.

func (*QueryExampleItem) ContainsField

func (p *QueryExampleItem) ContainsField(item string) bool

func (*QueryExampleItem) Count

func (p *QueryExampleItem) Count(in *Query) int64

func (*QueryExampleItem) DefaultFields

func (p *QueryExampleItem) DefaultFields() string

DefaultFields all fields generated by QueryExampleItem

func (*QueryExampleItem) Scan

func (p *QueryExampleItem) Scan(val interface{}) error

func (*QueryExampleItem) SetDB

func (p *QueryExampleItem) SetDB(db *sqlx.DB)

SetDB setting database

func (*QueryExampleItem) TableName

func (p *QueryExampleItem) TableName() string

TableName overrides the default tablename generated by QueryExampleItem

func (*QueryExampleItem) Value

func (p *QueryExampleItem) Value() (driver.Value, error)

type Query_First

type Query_First struct {
	First int64 `protobuf:"varint,4,opt,name=first,proto3,oneof"`
}

func NewPopulatedQuery_First

func NewPopulatedQuery_First(r randyExample, easy bool) *Query_First

func (*Query_First) Equal

func (this *Query_First) Equal(that interface{}) bool

func (*Query_First) GoString

func (this *Query_First) GoString() string

func (*Query_First) MarshalTo

func (m *Query_First) MarshalTo(dAtA []byte) (int, error)

func (*Query_First) Size

func (m *Query_First) Size() (n int)

func (*Query_First) String

func (this *Query_First) String() string

type Query_Last

type Query_Last struct {
	Last int64 `protobuf:"varint,5,opt,name=last,proto3,oneof"`
}

func NewPopulatedQuery_Last

func NewPopulatedQuery_Last(r randyExample, easy bool) *Query_Last

func (*Query_Last) Equal

func (this *Query_Last) Equal(that interface{}) bool

func (*Query_Last) GoString

func (this *Query_Last) GoString() string

func (*Query_Last) MarshalTo

func (m *Query_Last) MarshalTo(dAtA []byte) (int, error)

func (*Query_Last) Size

func (m *Query_Last) Size() (n int)

func (*Query_Last) String

func (this *Query_Last) String() string

type Query_Page

type Query_Page struct {
	Page int64 `protobuf:"varint,3,opt,name=page,proto3,oneof"`
}

func NewPopulatedQuery_Page

func NewPopulatedQuery_Page(r randyExample, easy bool) *Query_Page

func (*Query_Page) Equal

func (this *Query_Page) Equal(that interface{}) bool

func (*Query_Page) GoString

func (this *Query_Page) GoString() string

func (*Query_Page) MarshalTo

func (m *Query_Page) MarshalTo(dAtA []byte) (int, error)

func (*Query_Page) Size

func (m *Query_Page) Size() (n int)

func (*Query_Page) String

func (this *Query_Page) String() string

type Response

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

func NewPopulatedResponse

func NewPopulatedResponse(r randyExample, easy bool) *Response

func (*Response) Descriptor

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

func (*Response) Equal

func (this *Response) Equal(that interface{}) bool

func (*Response) GetData

func (m *Response) GetData() []byte

func (*Response) GoString

func (this *Response) GoString() string

func (*Response) Marshal

func (m *Response) Marshal() (dAtA []byte, err error)

func (*Response) MarshalTo

func (m *Response) MarshalTo(dAtA []byte) (int, error)

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) Reset

func (m *Response) Reset()

func (*Response) Size

func (m *Response) Size() (n int)

func (*Response) String

func (this *Response) String() string

func (*Response) Unmarshal

func (m *Response) Unmarshal(dAtA []byte) error

func (*Response) XXX_DiscardUnknown

func (m *Response) XXX_DiscardUnknown()

func (*Response) XXX_Marshal

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

func (*Response) XXX_Merge

func (dst *Response) XXX_Merge(src proto.Message)

func (*Response) XXX_Size

func (m *Response) XXX_Size() int

func (*Response) XXX_Unmarshal

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

type ResponseList

type ResponseList struct {
	Data [][]byte `protobuf:"bytes,1,rep,name=data" json:"data,omitempty"`
	//    repeated Example data = 1;
	Total                int64     `protobuf:"varint,2,opt,name=total,proto3" json:"total,omitempty"`
	PageInfo             *PageInfo `protobuf:"bytes,3,opt,name=page_info,json=pageInfo" json:"page_info,omitempty"`
	XXX_NoUnkeyedLiteral struct{}  `json:"-"`
	XXX_unrecognized     []byte    `json:"-"`
	XXX_sizecache        int32     `json:"-"`
}

func NewPopulatedResponseList

func NewPopulatedResponseList(r randyExample, easy bool) *ResponseList

func (*ResponseList) Descriptor

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

func (*ResponseList) Equal

func (this *ResponseList) Equal(that interface{}) bool

func (*ResponseList) GetData

func (m *ResponseList) GetData() [][]byte

func (*ResponseList) GetPageInfo

func (m *ResponseList) GetPageInfo() *PageInfo

func (*ResponseList) GetTotal

func (m *ResponseList) GetTotal() int64

func (*ResponseList) GoString

func (this *ResponseList) GoString() string

func (*ResponseList) Marshal

func (m *ResponseList) Marshal() (dAtA []byte, err error)

func (*ResponseList) MarshalTo

func (m *ResponseList) MarshalTo(dAtA []byte) (int, error)

func (*ResponseList) ProtoMessage

func (*ResponseList) ProtoMessage()

func (*ResponseList) Reset

func (m *ResponseList) Reset()

func (*ResponseList) Size

func (m *ResponseList) Size() (n int)

func (*ResponseList) String

func (this *ResponseList) String() string

func (*ResponseList) Unmarshal

func (m *ResponseList) Unmarshal(dAtA []byte) error

func (*ResponseList) XXX_DiscardUnknown

func (m *ResponseList) XXX_DiscardUnknown()

func (*ResponseList) XXX_Marshal

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

func (*ResponseList) XXX_Merge

func (dst *ResponseList) XXX_Merge(src proto.Message)

func (*ResponseList) XXX_Size

func (m *ResponseList) XXX_Size() int

func (*ResponseList) XXX_Unmarshal

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

type Result

type Result struct {
	Total int64
}

type SortCriteria

type SortCriteria struct {
	// Tag is a JSON tag.
	Tag                  string             `protobuf:"bytes,1,opt,name=tag,proto3" json:"tag,omitempty"`
	Order                SortCriteria_Order `protobuf:"varint,2,opt,name=order,proto3,enum=example.SortCriteria_Order" json:"order,omitempty"`
	XXX_NoUnkeyedLiteral struct{}           `json:"-"`
	XXX_unrecognized     []byte             `json:"-"`
	XXX_sizecache        int32              `json:"-"`
}

SortCriteria represents sort criteria

func NewPopulatedSortCriteria

func NewPopulatedSortCriteria(r randyExample, easy bool) *SortCriteria

func (*SortCriteria) Descriptor

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

func (*SortCriteria) Equal

func (this *SortCriteria) Equal(that interface{}) bool

func (*SortCriteria) GetOrder

func (m *SortCriteria) GetOrder() SortCriteria_Order

func (*SortCriteria) GetTag

func (m *SortCriteria) GetTag() string

func (*SortCriteria) GoString

func (this *SortCriteria) GoString() string

func (*SortCriteria) Marshal

func (m *SortCriteria) Marshal() (dAtA []byte, err error)

func (*SortCriteria) MarshalTo

func (m *SortCriteria) MarshalTo(dAtA []byte) (int, error)

func (*SortCriteria) ProtoMessage

func (*SortCriteria) ProtoMessage()

func (*SortCriteria) Reset

func (m *SortCriteria) Reset()

func (*SortCriteria) Size

func (m *SortCriteria) Size() (n int)

func (*SortCriteria) String

func (this *SortCriteria) String() string

func (*SortCriteria) Unmarshal

func (m *SortCriteria) Unmarshal(dAtA []byte) error

func (*SortCriteria) XXX_DiscardUnknown

func (m *SortCriteria) XXX_DiscardUnknown()

func (*SortCriteria) XXX_Marshal

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

func (*SortCriteria) XXX_Merge

func (dst *SortCriteria) XXX_Merge(src proto.Message)

func (*SortCriteria) XXX_Size

func (m *SortCriteria) XXX_Size() int

func (*SortCriteria) XXX_Unmarshal

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

type SortCriteria_Order

type SortCriteria_Order int32

Order is a sort order.

const (
	// ascending sort order
	ASC SortCriteria_Order = 0
	// descending sort order
	DESC SortCriteria_Order = 1
)

func (SortCriteria_Order) EnumDescriptor

func (SortCriteria_Order) EnumDescriptor() ([]byte, []int)

func (SortCriteria_Order) String

func (x SortCriteria_Order) String() string

type Sorting

type Sorting struct {
	Sort                 []*SortCriteria `protobuf:"bytes,1,rep,name=sort" json:"sort,omitempty"`
	XXX_NoUnkeyedLiteral struct{}        `json:"-"`
	XXX_unrecognized     []byte          `json:"-"`
	XXX_sizecache        int32           `json:"-"`
}

Sorting represents list of sort criterias.

func NewPopulatedSorting

func NewPopulatedSorting(r randyExample, easy bool) *Sorting

func (*Sorting) Descriptor

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

func (*Sorting) Equal

func (this *Sorting) Equal(that interface{}) bool

func (*Sorting) GetSort

func (m *Sorting) GetSort() []*SortCriteria

func (*Sorting) GoString

func (this *Sorting) GoString() string

func (*Sorting) Marshal

func (m *Sorting) Marshal() (dAtA []byte, err error)

func (*Sorting) MarshalTo

func (m *Sorting) MarshalTo(dAtA []byte) (int, error)

func (*Sorting) ProtoMessage

func (*Sorting) ProtoMessage()

func (*Sorting) Reset

func (m *Sorting) Reset()

func (*Sorting) Size

func (m *Sorting) Size() (n int)

func (*Sorting) String

func (this *Sorting) String() string

func (*Sorting) Unmarshal

func (m *Sorting) Unmarshal(dAtA []byte) error

func (*Sorting) XXX_DiscardUnknown

func (m *Sorting) XXX_DiscardUnknown()

func (*Sorting) XXX_Marshal

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

func (*Sorting) XXX_Merge

func (dst *Sorting) XXX_Merge(src proto.Message)

func (*Sorting) XXX_Size

func (m *Sorting) XXX_Size() int

func (*Sorting) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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