part

package
v0.0.0-...-f52a17c Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2020 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Package part is a generated protocol buffer package.

It is generated from these files:
	github.com/abronan/part-grpc/api/part/v1/part.proto

It has these top-level messages:
	Part
	CreatePartRequest
	CreatePartResponse
	CreatePartsRequest
	CreatePartsResponse
	GetPartRequest
	GetPartResponse
	ListPartRequest
	ListPartResponse
	DeletePartRequest
	DeletePartResponse
	UpdatePartRequest
	UpdatePartResponse
	UpdatePartsRequest
	UpdatePartsResponse

Package part is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthPart = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowPart   = fmt.Errorf("proto: integer overflow")
)

Functions

func RegisterPartServiceHandler

func RegisterPartServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterPartServiceHandler registers the http handlers for service PartService to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterPartServiceHandlerClient

func RegisterPartServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PartServiceClient) error

RegisterPartServiceHandler registers the http handlers for service PartService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "PartServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "PartServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "PartServiceClient" to call the correct interceptors.

func RegisterPartServiceHandlerFromEndpoint

func RegisterPartServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterPartServiceHandlerFromEndpoint is same as RegisterPartServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterPartServiceServer

func RegisterPartServiceServer(s *grpc.Server, srv PartServiceServer)

Types

type CreatePartRequest

type CreatePartRequest struct {
	Item *Part `protobuf:"bytes,1,opt,name=item" json:"item,omitempty"`
}

func (*CreatePartRequest) Descriptor

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

func (*CreatePartRequest) Marshal

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

func (*CreatePartRequest) MarshalTo

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

func (*CreatePartRequest) ProtoMessage

func (*CreatePartRequest) ProtoMessage()

func (*CreatePartRequest) Reset

func (m *CreatePartRequest) Reset()

func (*CreatePartRequest) Size

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

func (*CreatePartRequest) String

func (this *CreatePartRequest) String() string

func (*CreatePartRequest) Unmarshal

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

type CreatePartResponse

type CreatePartResponse struct {
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
}

func (*CreatePartResponse) Descriptor

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

func (*CreatePartResponse) Marshal

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

func (*CreatePartResponse) MarshalTo

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

func (*CreatePartResponse) ProtoMessage

func (*CreatePartResponse) ProtoMessage()

func (*CreatePartResponse) Reset

func (m *CreatePartResponse) Reset()

func (*CreatePartResponse) Size

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

func (*CreatePartResponse) String

func (this *CreatePartResponse) String() string

func (*CreatePartResponse) Unmarshal

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

type CreatePartsRequest

type CreatePartsRequest struct {
	Items []*Part `protobuf:"bytes,1,rep,name=items" json:"items,omitempty"`
}

func (*CreatePartsRequest) Descriptor

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

func (*CreatePartsRequest) Marshal

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

func (*CreatePartsRequest) MarshalTo

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

func (*CreatePartsRequest) ProtoMessage

func (*CreatePartsRequest) ProtoMessage()

func (*CreatePartsRequest) Reset

func (m *CreatePartsRequest) Reset()

func (*CreatePartsRequest) Size

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

func (*CreatePartsRequest) String

func (this *CreatePartsRequest) String() string

func (*CreatePartsRequest) Unmarshal

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

type CreatePartsResponse

type CreatePartsResponse struct {
	Ids []string `protobuf:"bytes,1,rep,name=ids" json:"ids,omitempty"`
}

func (*CreatePartsResponse) Descriptor

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

func (*CreatePartsResponse) Marshal

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

func (*CreatePartsResponse) MarshalTo

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

func (*CreatePartsResponse) ProtoMessage

func (*CreatePartsResponse) ProtoMessage()

func (*CreatePartsResponse) Reset

func (m *CreatePartsResponse) Reset()

func (*CreatePartsResponse) Size

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

func (*CreatePartsResponse) String

func (this *CreatePartsResponse) String() string

func (*CreatePartsResponse) Unmarshal

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

type DeletePartRequest

type DeletePartRequest struct {
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
}

func (*DeletePartRequest) Descriptor

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

func (*DeletePartRequest) Marshal

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

func (*DeletePartRequest) MarshalTo

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

func (*DeletePartRequest) ProtoMessage

func (*DeletePartRequest) ProtoMessage()

func (*DeletePartRequest) Reset

func (m *DeletePartRequest) Reset()

func (*DeletePartRequest) Size

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

func (*DeletePartRequest) String

func (this *DeletePartRequest) String() string

func (*DeletePartRequest) Unmarshal

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

type DeletePartResponse

type DeletePartResponse struct {
}

func (*DeletePartResponse) Descriptor

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

func (*DeletePartResponse) Marshal

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

func (*DeletePartResponse) MarshalTo

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

func (*DeletePartResponse) ProtoMessage

func (*DeletePartResponse) ProtoMessage()

func (*DeletePartResponse) Reset

func (m *DeletePartResponse) Reset()

func (*DeletePartResponse) Size

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

func (*DeletePartResponse) String

func (this *DeletePartResponse) String() string

func (*DeletePartResponse) Unmarshal

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

type GetPartRequest

type GetPartRequest struct {
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
}

func (*GetPartRequest) Descriptor

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

func (*GetPartRequest) Marshal

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

func (*GetPartRequest) MarshalTo

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

func (*GetPartRequest) ProtoMessage

func (*GetPartRequest) ProtoMessage()

func (*GetPartRequest) Reset

func (m *GetPartRequest) Reset()

func (*GetPartRequest) Size

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

func (*GetPartRequest) String

func (this *GetPartRequest) String() string

func (*GetPartRequest) Unmarshal

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

type GetPartResponse

type GetPartResponse struct {
	Item *Part `protobuf:"bytes,1,opt,name=item" json:"item,omitempty"`
}

func (*GetPartResponse) Descriptor

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

func (*GetPartResponse) Marshal

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

func (*GetPartResponse) MarshalTo

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

func (*GetPartResponse) ProtoMessage

func (*GetPartResponse) ProtoMessage()

func (*GetPartResponse) Reset

func (m *GetPartResponse) Reset()

func (*GetPartResponse) Size

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

func (*GetPartResponse) String

func (this *GetPartResponse) String() string

func (*GetPartResponse) Unmarshal

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

type ListPartRequest

type ListPartRequest struct {
	Limit        int32 `protobuf:"varint,1,opt,name=limit,proto3" json:"limit,omitempty"`
	NotCompleted bool  `protobuf:"varint,2,opt,name=not_completed,json=notCompleted,proto3" json:"not_completed,omitempty"`
}

func (*ListPartRequest) Descriptor

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

func (*ListPartRequest) Marshal

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

func (*ListPartRequest) MarshalTo

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

func (*ListPartRequest) ProtoMessage

func (*ListPartRequest) ProtoMessage()

func (*ListPartRequest) Reset

func (m *ListPartRequest) Reset()

func (*ListPartRequest) Size

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

func (*ListPartRequest) String

func (this *ListPartRequest) String() string

func (*ListPartRequest) Unmarshal

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

type ListPartResponse

type ListPartResponse struct {
	Items []*Part `protobuf:"bytes,1,rep,name=items" json:"items,omitempty"`
}

func (*ListPartResponse) Descriptor

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

func (*ListPartResponse) Marshal

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

func (*ListPartResponse) MarshalTo

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

func (*ListPartResponse) ProtoMessage

func (*ListPartResponse) ProtoMessage()

func (*ListPartResponse) Reset

func (m *ListPartResponse) Reset()

func (*ListPartResponse) Size

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

func (*ListPartResponse) String

func (this *ListPartResponse) String() string

func (*ListPartResponse) Unmarshal

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

type Part

type Part struct {
	Id          string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Title       string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
	Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
	// @inject_tag: sql:",notnull,default:false"
	Completed bool `protobuf:"varint,4,opt,name=completed,proto3" json:"completed,omitempty" sql:",notnull,default:false"`
	// @inject_tag: sql:"type:timestamptz,default:now()"
	CreatedAt *google_protobuf1.Timestamp `protobuf:"bytes,5,opt,name=created_at,json=createdAt" json:"created_at,omitempty" sql:"type:timestamptz,default:now()"`
	// @inject_tag: sql:"type:timestamptz"
	UpdatedAt *google_protobuf1.Timestamp `protobuf:"bytes,6,opt,name=updated_at,json=updatedAt" json:"updated_at,omitempty" sql:"type:timestamptz"`
}

func (*Part) Descriptor

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

func (*Part) Marshal

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

func (*Part) MarshalTo

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

func (*Part) ProtoMessage

func (*Part) ProtoMessage()

func (*Part) Reset

func (m *Part) Reset()

func (*Part) Size

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

func (*Part) String

func (this *Part) String() string

func (*Part) Unmarshal

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

type PartServiceClient

type PartServiceClient interface {
	CreatePart(ctx context.Context, in *CreatePartRequest, opts ...grpc.CallOption) (*CreatePartResponse, error)
	// Bulk version of CreatePart
	CreateParts(ctx context.Context, in *CreatePartsRequest, opts ...grpc.CallOption) (*CreatePartsResponse, error)
	GetPart(ctx context.Context, in *GetPartRequest, opts ...grpc.CallOption) (*GetPartResponse, error)
	ListPart(ctx context.Context, in *ListPartRequest, opts ...grpc.CallOption) (*ListPartResponse, error)
	DeletePart(ctx context.Context, in *DeletePartRequest, opts ...grpc.CallOption) (*DeletePartResponse, error)
	UpdatePart(ctx context.Context, in *UpdatePartRequest, opts ...grpc.CallOption) (*UpdatePartResponse, error)
	UpdateParts(ctx context.Context, in *UpdatePartsRequest, opts ...grpc.CallOption) (*UpdatePartsResponse, error)
}

func NewPartServiceClient

func NewPartServiceClient(cc *grpc.ClientConn) PartServiceClient

type UpdatePartRequest

type UpdatePartRequest struct {
	Item *Part `protobuf:"bytes,1,opt,name=item" json:"item,omitempty"`
}

func (*UpdatePartRequest) Descriptor

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

func (*UpdatePartRequest) Marshal

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

func (*UpdatePartRequest) MarshalTo

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

func (*UpdatePartRequest) ProtoMessage

func (*UpdatePartRequest) ProtoMessage()

func (*UpdatePartRequest) Reset

func (m *UpdatePartRequest) Reset()

func (*UpdatePartRequest) Size

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

func (*UpdatePartRequest) String

func (this *UpdatePartRequest) String() string

func (*UpdatePartRequest) Unmarshal

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

type UpdatePartResponse

type UpdatePartResponse struct {
}

func (*UpdatePartResponse) Descriptor

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

func (*UpdatePartResponse) Marshal

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

func (*UpdatePartResponse) MarshalTo

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

func (*UpdatePartResponse) ProtoMessage

func (*UpdatePartResponse) ProtoMessage()

func (*UpdatePartResponse) Reset

func (m *UpdatePartResponse) Reset()

func (*UpdatePartResponse) Size

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

func (*UpdatePartResponse) String

func (this *UpdatePartResponse) String() string

func (*UpdatePartResponse) Unmarshal

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

type UpdatePartsRequest

type UpdatePartsRequest struct {
	Items []*Part `protobuf:"bytes,1,rep,name=items" json:"items,omitempty"`
}

func (*UpdatePartsRequest) Descriptor

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

func (*UpdatePartsRequest) Marshal

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

func (*UpdatePartsRequest) MarshalTo

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

func (*UpdatePartsRequest) ProtoMessage

func (*UpdatePartsRequest) ProtoMessage()

func (*UpdatePartsRequest) Reset

func (m *UpdatePartsRequest) Reset()

func (*UpdatePartsRequest) Size

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

func (*UpdatePartsRequest) String

func (this *UpdatePartsRequest) String() string

func (*UpdatePartsRequest) Unmarshal

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

type UpdatePartsResponse

type UpdatePartsResponse struct {
}

func (*UpdatePartsResponse) Descriptor

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

func (*UpdatePartsResponse) Marshal

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

func (*UpdatePartsResponse) MarshalTo

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

func (*UpdatePartsResponse) ProtoMessage

func (*UpdatePartsResponse) ProtoMessage()

func (*UpdatePartsResponse) Reset

func (m *UpdatePartsResponse) Reset()

func (*UpdatePartsResponse) Size

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

func (*UpdatePartsResponse) String

func (this *UpdatePartsResponse) String() string

func (*UpdatePartsResponse) Unmarshal

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

Jump to

Keyboard shortcuts

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