Documentation ¶
Overview ¶
Package cycles is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterCycleServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterCycleServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client CycleServiceClient) error
- func RegisterCycleServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterCycleServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server CycleServiceServer) error
- func RegisterCycleServiceServer(s *grpc.Server, srv CycleServiceServer)
- type CreateCycleRequest
- func (*CreateCycleRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateCycleRequest) GetActive() bool
- func (x *CreateCycleRequest) GetDescription() string
- func (x *CreateCycleRequest) GetEndAt() *timestamp.Timestamp
- func (x *CreateCycleRequest) GetStartAt() *timestamp.Timestamp
- func (x *CreateCycleRequest) GetTitle() string
- func (*CreateCycleRequest) ProtoMessage()
- func (x *CreateCycleRequest) ProtoReflect() protoreflect.Message
- func (x *CreateCycleRequest) Reset()
- func (x *CreateCycleRequest) String() string
- type Cycle
- func (*Cycle) Descriptor() ([]byte, []int)deprecated
- func (x *Cycle) GetActive() bool
- func (x *Cycle) GetCreatedAt() *timestamp.Timestamp
- func (x *Cycle) GetCreator() *users.User
- func (x *Cycle) GetDescription() string
- func (x *Cycle) GetEndAt() *timestamp.Timestamp
- func (x *Cycle) GetId() uint64
- func (x *Cycle) GetStartAt() *timestamp.Timestamp
- func (x *Cycle) GetTitle() string
- func (x *Cycle) GetUpdatedAt() *timestamp.Timestamp
- func (x *Cycle) GetUuid() string
- func (*Cycle) ProtoMessage()
- func (x *Cycle) ProtoReflect() protoreflect.Message
- func (x *Cycle) Reset()
- func (x *Cycle) String() string
- type CycleServiceClient
- type CycleServiceServer
- type DeleteCycleRequest
- func (*DeleteCycleRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DeleteCycleRequest) GetUuid() string
- func (*DeleteCycleRequest) ProtoMessage()
- func (x *DeleteCycleRequest) ProtoReflect() protoreflect.Message
- func (x *DeleteCycleRequest) Reset()
- func (x *DeleteCycleRequest) String() string
- type GetCycleRequest
- type ListCyclesRequest
- func (*ListCyclesRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListCyclesRequest) GetLimit() int64
- func (x *ListCyclesRequest) GetOffset() int64
- func (*ListCyclesRequest) ProtoMessage()
- func (x *ListCyclesRequest) ProtoReflect() protoreflect.Message
- func (x *ListCyclesRequest) Reset()
- func (x *ListCyclesRequest) String() string
- type ListCyclesResponse
- func (*ListCyclesResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListCyclesResponse) GetCycles() []*Cycle
- func (x *ListCyclesResponse) GetLimit() int64
- func (x *ListCyclesResponse) GetOffset() int64
- func (x *ListCyclesResponse) GetTotalCount() int64
- func (*ListCyclesResponse) ProtoMessage()
- func (x *ListCyclesResponse) ProtoReflect() protoreflect.Message
- func (x *ListCyclesResponse) Reset()
- func (x *ListCyclesResponse) String() string
- type UnimplementedCycleServiceServer
- func (*UnimplementedCycleServiceServer) CreateCycle(context.Context, *CreateCycleRequest) (*Cycle, error)
- func (*UnimplementedCycleServiceServer) DeleteCycle(context.Context, *DeleteCycleRequest) (*empty.Empty, error)
- func (*UnimplementedCycleServiceServer) GetCycle(context.Context, *GetCycleRequest) (*Cycle, error)
- func (*UnimplementedCycleServiceServer) ListCycles(context.Context, *ListCyclesRequest) (*ListCyclesResponse, error)
- func (*UnimplementedCycleServiceServer) UpdateCycle(context.Context, *UpdateCycleRequest) (*Cycle, error)
- type UpdateCycleRequest
- func (*UpdateCycleRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateCycleRequest) GetActive() bool
- func (x *UpdateCycleRequest) GetDescription() string
- func (x *UpdateCycleRequest) GetEndAt() *timestamp.Timestamp
- func (x *UpdateCycleRequest) GetStartAt() *timestamp.Timestamp
- func (x *UpdateCycleRequest) GetTitle() string
- func (x *UpdateCycleRequest) GetUuid() string
- func (*UpdateCycleRequest) ProtoMessage()
- func (x *UpdateCycleRequest) ProtoReflect() protoreflect.Message
- func (x *UpdateCycleRequest) Reset()
- func (x *UpdateCycleRequest) String() string
Constants ¶
This section is empty.
Variables ¶
var File_protobuf_cycles_cycles_proto protoreflect.FileDescriptor
var File_protobuf_cycles_model_proto protoreflect.FileDescriptor
Functions ¶
func RegisterCycleServiceHandler ¶
func RegisterCycleServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterCycleServiceHandler registers the http handlers for service CycleService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterCycleServiceHandlerClient ¶
func RegisterCycleServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client CycleServiceClient) error
RegisterCycleServiceHandlerClient registers the http handlers for service CycleService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "CycleServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "CycleServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "CycleServiceClient" to call the correct interceptors.
func RegisterCycleServiceHandlerFromEndpoint ¶
func RegisterCycleServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterCycleServiceHandlerFromEndpoint is same as RegisterCycleServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterCycleServiceHandlerServer ¶
func RegisterCycleServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server CycleServiceServer) error
RegisterCycleServiceHandlerServer registers the http handlers for service CycleService to "mux". UnaryRPC :call CycleServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterCycleServiceHandlerFromEndpoint instead.
func RegisterCycleServiceServer ¶
func RegisterCycleServiceServer(s *grpc.Server, srv CycleServiceServer)
Types ¶
type CreateCycleRequest ¶
type CreateCycleRequest struct { Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` Active bool `protobuf:"varint,2,opt,name=active,proto3" json:"active,omitempty"` Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` StartAt *timestamp.Timestamp `protobuf:"bytes,4,opt,name=start_at,json=startAt,proto3" json:"start_at,omitempty"` EndAt *timestamp.Timestamp `protobuf:"bytes,5,opt,name=end_at,json=endAt,proto3" json:"end_at,omitempty"` // contains filtered or unexported fields }
func (*CreateCycleRequest) Descriptor
deprecated
func (*CreateCycleRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateCycleRequest.ProtoReflect.Descriptor instead.
func (*CreateCycleRequest) GetActive ¶
func (x *CreateCycleRequest) GetActive() bool
func (*CreateCycleRequest) GetDescription ¶
func (x *CreateCycleRequest) GetDescription() string
func (*CreateCycleRequest) GetEndAt ¶
func (x *CreateCycleRequest) GetEndAt() *timestamp.Timestamp
func (*CreateCycleRequest) GetStartAt ¶
func (x *CreateCycleRequest) GetStartAt() *timestamp.Timestamp
func (*CreateCycleRequest) GetTitle ¶
func (x *CreateCycleRequest) GetTitle() string
func (*CreateCycleRequest) ProtoMessage ¶
func (*CreateCycleRequest) ProtoMessage()
func (*CreateCycleRequest) ProtoReflect ¶
func (x *CreateCycleRequest) ProtoReflect() protoreflect.Message
func (*CreateCycleRequest) Reset ¶
func (x *CreateCycleRequest) Reset()
func (*CreateCycleRequest) String ¶
func (x *CreateCycleRequest) String() string
type Cycle ¶
type Cycle struct { Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Uuid string `protobuf:"bytes,2,opt,name=uuid,proto3" json:"uuid,omitempty"` Title string `protobuf:"bytes,3,opt,name=title,proto3" json:"title,omitempty"` Active bool `protobuf:"varint,4,opt,name=active,proto3" json:"active,omitempty"` Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"` Creator *users.User `protobuf:"bytes,6,opt,name=creator,proto3" json:"creator,omitempty"` StartAt *timestamp.Timestamp `protobuf:"bytes,7,opt,name=start_at,json=startAt,proto3" json:"start_at,omitempty"` EndAt *timestamp.Timestamp `protobuf:"bytes,8,opt,name=end_at,json=endAt,proto3" json:"end_at,omitempty"` CreatedAt *timestamp.Timestamp `protobuf:"bytes,9,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` UpdatedAt *timestamp.Timestamp `protobuf:"bytes,10,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` // contains filtered or unexported fields }
func (*Cycle) Descriptor
deprecated
func (*Cycle) GetCreatedAt ¶
func (*Cycle) GetCreator ¶
func (*Cycle) GetDescription ¶
func (*Cycle) GetStartAt ¶
func (*Cycle) GetUpdatedAt ¶
func (*Cycle) ProtoMessage ¶
func (*Cycle) ProtoMessage()
func (*Cycle) ProtoReflect ¶
func (x *Cycle) ProtoReflect() protoreflect.Message
type CycleServiceClient ¶
type CycleServiceClient interface { // List Cycles ListCycles(ctx context.Context, in *ListCyclesRequest, opts ...grpc.CallOption) (*ListCyclesResponse, error) // Get Cycle GetCycle(ctx context.Context, in *GetCycleRequest, opts ...grpc.CallOption) (*Cycle, error) // Create Cycle object request CreateCycle(ctx context.Context, in *CreateCycleRequest, opts ...grpc.CallOption) (*Cycle, error) // Update Cycle object request UpdateCycle(ctx context.Context, in *UpdateCycleRequest, opts ...grpc.CallOption) (*Cycle, error) // Delete Cycle object request DeleteCycle(ctx context.Context, in *DeleteCycleRequest, opts ...grpc.CallOption) (*empty.Empty, error) }
CycleServiceClient is the client API for CycleService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewCycleServiceClient ¶
func NewCycleServiceClient(cc grpc.ClientConnInterface) CycleServiceClient
type CycleServiceServer ¶
type CycleServiceServer interface { // List Cycles ListCycles(context.Context, *ListCyclesRequest) (*ListCyclesResponse, error) // Get Cycle GetCycle(context.Context, *GetCycleRequest) (*Cycle, error) // Create Cycle object request CreateCycle(context.Context, *CreateCycleRequest) (*Cycle, error) // Update Cycle object request UpdateCycle(context.Context, *UpdateCycleRequest) (*Cycle, error) // Delete Cycle object request DeleteCycle(context.Context, *DeleteCycleRequest) (*empty.Empty, error) }
CycleServiceServer is the server API for CycleService service.
type DeleteCycleRequest ¶
type DeleteCycleRequest struct { Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` // contains filtered or unexported fields }
func (*DeleteCycleRequest) Descriptor
deprecated
func (*DeleteCycleRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteCycleRequest.ProtoReflect.Descriptor instead.
func (*DeleteCycleRequest) GetUuid ¶
func (x *DeleteCycleRequest) GetUuid() string
func (*DeleteCycleRequest) ProtoMessage ¶
func (*DeleteCycleRequest) ProtoMessage()
func (*DeleteCycleRequest) ProtoReflect ¶
func (x *DeleteCycleRequest) ProtoReflect() protoreflect.Message
func (*DeleteCycleRequest) Reset ¶
func (x *DeleteCycleRequest) Reset()
func (*DeleteCycleRequest) String ¶
func (x *DeleteCycleRequest) String() string
type GetCycleRequest ¶
type GetCycleRequest struct { Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` // contains filtered or unexported fields }
func (*GetCycleRequest) Descriptor
deprecated
func (*GetCycleRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetCycleRequest.ProtoReflect.Descriptor instead.
func (*GetCycleRequest) GetUuid ¶
func (x *GetCycleRequest) GetUuid() string
func (*GetCycleRequest) ProtoMessage ¶
func (*GetCycleRequest) ProtoMessage()
func (*GetCycleRequest) ProtoReflect ¶
func (x *GetCycleRequest) ProtoReflect() protoreflect.Message
func (*GetCycleRequest) Reset ¶
func (x *GetCycleRequest) Reset()
func (*GetCycleRequest) String ¶
func (x *GetCycleRequest) String() string
type ListCyclesRequest ¶
type ListCyclesRequest struct { Limit int64 `protobuf:"varint,1,opt,name=limit,proto3" json:"limit,omitempty"` Offset int64 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"` // contains filtered or unexported fields }
func (*ListCyclesRequest) Descriptor
deprecated
func (*ListCyclesRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListCyclesRequest.ProtoReflect.Descriptor instead.
func (*ListCyclesRequest) GetLimit ¶
func (x *ListCyclesRequest) GetLimit() int64
func (*ListCyclesRequest) GetOffset ¶
func (x *ListCyclesRequest) GetOffset() int64
func (*ListCyclesRequest) ProtoMessage ¶
func (*ListCyclesRequest) ProtoMessage()
func (*ListCyclesRequest) ProtoReflect ¶
func (x *ListCyclesRequest) ProtoReflect() protoreflect.Message
func (*ListCyclesRequest) Reset ¶
func (x *ListCyclesRequest) Reset()
func (*ListCyclesRequest) String ¶
func (x *ListCyclesRequest) String() string
type ListCyclesResponse ¶
type ListCyclesResponse struct { Cycles []*Cycle `protobuf:"bytes,1,rep,name=cycles,proto3" json:"cycles,omitempty"` TotalCount int64 `protobuf:"varint,2,opt,name=total_count,json=totalCount,proto3" json:"total_count,omitempty"` Limit int64 `protobuf:"varint,3,opt,name=limit,proto3" json:"limit,omitempty"` Offset int64 `protobuf:"varint,4,opt,name=offset,proto3" json:"offset,omitempty"` // contains filtered or unexported fields }
func (*ListCyclesResponse) Descriptor
deprecated
func (*ListCyclesResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListCyclesResponse.ProtoReflect.Descriptor instead.
func (*ListCyclesResponse) GetCycles ¶
func (x *ListCyclesResponse) GetCycles() []*Cycle
func (*ListCyclesResponse) GetLimit ¶
func (x *ListCyclesResponse) GetLimit() int64
func (*ListCyclesResponse) GetOffset ¶
func (x *ListCyclesResponse) GetOffset() int64
func (*ListCyclesResponse) GetTotalCount ¶
func (x *ListCyclesResponse) GetTotalCount() int64
func (*ListCyclesResponse) ProtoMessage ¶
func (*ListCyclesResponse) ProtoMessage()
func (*ListCyclesResponse) ProtoReflect ¶
func (x *ListCyclesResponse) ProtoReflect() protoreflect.Message
func (*ListCyclesResponse) Reset ¶
func (x *ListCyclesResponse) Reset()
func (*ListCyclesResponse) String ¶
func (x *ListCyclesResponse) String() string
type UnimplementedCycleServiceServer ¶
type UnimplementedCycleServiceServer struct { }
UnimplementedCycleServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedCycleServiceServer) CreateCycle ¶
func (*UnimplementedCycleServiceServer) CreateCycle(context.Context, *CreateCycleRequest) (*Cycle, error)
func (*UnimplementedCycleServiceServer) DeleteCycle ¶
func (*UnimplementedCycleServiceServer) DeleteCycle(context.Context, *DeleteCycleRequest) (*empty.Empty, error)
func (*UnimplementedCycleServiceServer) GetCycle ¶
func (*UnimplementedCycleServiceServer) GetCycle(context.Context, *GetCycleRequest) (*Cycle, error)
func (*UnimplementedCycleServiceServer) ListCycles ¶
func (*UnimplementedCycleServiceServer) ListCycles(context.Context, *ListCyclesRequest) (*ListCyclesResponse, error)
func (*UnimplementedCycleServiceServer) UpdateCycle ¶
func (*UnimplementedCycleServiceServer) UpdateCycle(context.Context, *UpdateCycleRequest) (*Cycle, error)
type UpdateCycleRequest ¶
type UpdateCycleRequest struct { Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"` Active bool `protobuf:"varint,3,opt,name=active,proto3" json:"active,omitempty"` Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` StartAt *timestamp.Timestamp `protobuf:"bytes,5,opt,name=start_at,json=startAt,proto3" json:"start_at,omitempty"` EndAt *timestamp.Timestamp `protobuf:"bytes,6,opt,name=end_at,json=endAt,proto3" json:"end_at,omitempty"` // contains filtered or unexported fields }
func (*UpdateCycleRequest) Descriptor
deprecated
func (*UpdateCycleRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateCycleRequest.ProtoReflect.Descriptor instead.
func (*UpdateCycleRequest) GetActive ¶
func (x *UpdateCycleRequest) GetActive() bool
func (*UpdateCycleRequest) GetDescription ¶
func (x *UpdateCycleRequest) GetDescription() string
func (*UpdateCycleRequest) GetEndAt ¶
func (x *UpdateCycleRequest) GetEndAt() *timestamp.Timestamp
func (*UpdateCycleRequest) GetStartAt ¶
func (x *UpdateCycleRequest) GetStartAt() *timestamp.Timestamp
func (*UpdateCycleRequest) GetTitle ¶
func (x *UpdateCycleRequest) GetTitle() string
func (*UpdateCycleRequest) GetUuid ¶
func (x *UpdateCycleRequest) GetUuid() string
func (*UpdateCycleRequest) ProtoMessage ¶
func (*UpdateCycleRequest) ProtoMessage()
func (*UpdateCycleRequest) ProtoReflect ¶
func (x *UpdateCycleRequest) ProtoReflect() protoreflect.Message
func (*UpdateCycleRequest) Reset ¶
func (x *UpdateCycleRequest) Reset()
func (*UpdateCycleRequest) String ¶
func (x *UpdateCycleRequest) String() string