api

package
v0.0.0-...-5a4938c Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2019 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterCalendarServiceServer

func RegisterCalendarServiceServer(s *grpc.Server, srv CalendarServiceServer)

Types

type CalendarServer

type CalendarServer struct {
	EventService *services.EventService
}

func (*CalendarServer) CreateEvent

func (*CalendarServer) DeleteEvent

func (*CalendarServer) GetEventsByTime

func (*CalendarServer) Serve

func (cs *CalendarServer) Serve(addr string) error

func (*CalendarServer) UpdateEvent

type CalendarServiceClient

type CalendarServiceClient interface {
	CreateEvent(ctx context.Context, in *CreateEventRequest, opts ...grpc.CallOption) (*CreateEventResponse, error)
	UpdateEvent(ctx context.Context, in *UpdateEventRequest, opts ...grpc.CallOption) (*UpdateEventResponse, error)
	DeleteEvent(ctx context.Context, in *DeleteEventRequest, opts ...grpc.CallOption) (*DeleteEventResponse, error)
	GetEventsByTime(ctx context.Context, in *GetEventsByTimeRequest, opts ...grpc.CallOption) (*GetEventsByTimeResponse, error)
}

CalendarServiceClient is the client API for CalendarService service.

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

func NewCalendarServiceClient

func NewCalendarServiceClient(cc *grpc.ClientConn) CalendarServiceClient

type CalendarServiceServer

CalendarServiceServer is the server API for CalendarService service.

type CreateEventRequest

type CreateEventRequest struct {
	ID                   int64                `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"`
	Title                string               `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
	Text                 string               `protobuf:"bytes,3,opt,name=text,proto3" json:"text,omitempty"`
	Owner                string               `protobuf:"bytes,4,opt,name=owner,proto3" json:"owner,omitempty"`
	StartTime            *timestamp.Timestamp `protobuf:"bytes,5,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"`
	EndTime              *timestamp.Timestamp `protobuf:"bytes,6,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"`
	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
	XXX_unrecognized     []byte               `json:"-"`
	XXX_sizecache        int32                `json:"-"`
}

func (*CreateEventRequest) Descriptor

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

func (*CreateEventRequest) GetEndTime

func (m *CreateEventRequest) GetEndTime() *timestamp.Timestamp

func (*CreateEventRequest) GetID

func (m *CreateEventRequest) GetID() int64

func (*CreateEventRequest) GetOwner

func (m *CreateEventRequest) GetOwner() string

func (*CreateEventRequest) GetStartTime

func (m *CreateEventRequest) GetStartTime() *timestamp.Timestamp

func (*CreateEventRequest) GetText

func (m *CreateEventRequest) GetText() string

func (*CreateEventRequest) GetTitle

func (m *CreateEventRequest) GetTitle() string

func (*CreateEventRequest) ProtoMessage

func (*CreateEventRequest) ProtoMessage()

func (*CreateEventRequest) Reset

func (m *CreateEventRequest) Reset()

func (*CreateEventRequest) String

func (m *CreateEventRequest) String() string

func (*CreateEventRequest) XXX_DiscardUnknown

func (m *CreateEventRequest) XXX_DiscardUnknown()

func (*CreateEventRequest) XXX_Marshal

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

func (*CreateEventRequest) XXX_Merge

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

func (*CreateEventRequest) XXX_Size

func (m *CreateEventRequest) XXX_Size() int

func (*CreateEventRequest) XXX_Unmarshal

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

type CreateEventResponse

type CreateEventResponse struct {
	// Types that are valid to be assigned to Result:
	//	*CreateEventResponse_Event
	//	*CreateEventResponse_Error
	Result               isCreateEventResponse_Result `protobuf_oneof:"result"`
	XXX_NoUnkeyedLiteral struct{}                     `json:"-"`
	XXX_unrecognized     []byte                       `json:"-"`
	XXX_sizecache        int32                        `json:"-"`
}

func (*CreateEventResponse) Descriptor

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

func (*CreateEventResponse) GetError

func (m *CreateEventResponse) GetError() string

func (*CreateEventResponse) GetEvent

func (m *CreateEventResponse) GetEvent() *Event

func (*CreateEventResponse) GetResult

func (m *CreateEventResponse) GetResult() isCreateEventResponse_Result

func (*CreateEventResponse) ProtoMessage

func (*CreateEventResponse) ProtoMessage()

func (*CreateEventResponse) Reset

func (m *CreateEventResponse) Reset()

func (*CreateEventResponse) String

func (m *CreateEventResponse) String() string

func (*CreateEventResponse) XXX_DiscardUnknown

func (m *CreateEventResponse) XXX_DiscardUnknown()

func (*CreateEventResponse) XXX_Marshal

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

func (*CreateEventResponse) XXX_Merge

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

func (*CreateEventResponse) XXX_OneofWrappers

func (*CreateEventResponse) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*CreateEventResponse) XXX_Size

func (m *CreateEventResponse) XXX_Size() int

func (*CreateEventResponse) XXX_Unmarshal

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

type CreateEventResponse_Error

type CreateEventResponse_Error struct {
	Error string `protobuf:"bytes,2,opt,name=error,proto3,oneof"`
}

type CreateEventResponse_Event

type CreateEventResponse_Event struct {
	Event *Event `protobuf:"bytes,1,opt,name=event,proto3,oneof"`
}

type DeleteEventRequest

type DeleteEventRequest 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 (*DeleteEventRequest) Descriptor

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

func (*DeleteEventRequest) GetID

func (m *DeleteEventRequest) GetID() int64

func (*DeleteEventRequest) ProtoMessage

func (*DeleteEventRequest) ProtoMessage()

func (*DeleteEventRequest) Reset

func (m *DeleteEventRequest) Reset()

func (*DeleteEventRequest) String

func (m *DeleteEventRequest) String() string

func (*DeleteEventRequest) XXX_DiscardUnknown

func (m *DeleteEventRequest) XXX_DiscardUnknown()

func (*DeleteEventRequest) XXX_Marshal

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

func (*DeleteEventRequest) XXX_Merge

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

func (*DeleteEventRequest) XXX_Size

func (m *DeleteEventRequest) XXX_Size() int

func (*DeleteEventRequest) XXX_Unmarshal

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

type DeleteEventResponse

type DeleteEventResponse struct {
	// Types that are valid to be assigned to Result:
	//	*DeleteEventResponse_Error
	Result               isDeleteEventResponse_Result `protobuf_oneof:"result"`
	XXX_NoUnkeyedLiteral struct{}                     `json:"-"`
	XXX_unrecognized     []byte                       `json:"-"`
	XXX_sizecache        int32                        `json:"-"`
}

func (*DeleteEventResponse) Descriptor

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

func (*DeleteEventResponse) GetError

func (m *DeleteEventResponse) GetError() string

func (*DeleteEventResponse) GetResult

func (m *DeleteEventResponse) GetResult() isDeleteEventResponse_Result

func (*DeleteEventResponse) ProtoMessage

func (*DeleteEventResponse) ProtoMessage()

func (*DeleteEventResponse) Reset

func (m *DeleteEventResponse) Reset()

func (*DeleteEventResponse) String

func (m *DeleteEventResponse) String() string

func (*DeleteEventResponse) XXX_DiscardUnknown

func (m *DeleteEventResponse) XXX_DiscardUnknown()

func (*DeleteEventResponse) XXX_Marshal

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

func (*DeleteEventResponse) XXX_Merge

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

func (*DeleteEventResponse) XXX_OneofWrappers

func (*DeleteEventResponse) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*DeleteEventResponse) XXX_Size

func (m *DeleteEventResponse) XXX_Size() int

func (*DeleteEventResponse) XXX_Unmarshal

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

type DeleteEventResponse_Error

type DeleteEventResponse_Error struct {
	Error string `protobuf:"bytes,1,opt,name=error,proto3,oneof"`
}

type Event

type Event struct {
	ID                   int64                `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"`
	Title                string               `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
	Text                 string               `protobuf:"bytes,3,opt,name=text,proto3" json:"text,omitempty"`
	Owner                string               `protobuf:"bytes,4,opt,name=owner,proto3" json:"owner,omitempty"`
	StartTime            *timestamp.Timestamp `protobuf:"bytes,5,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"`
	EndTime              *timestamp.Timestamp `protobuf:"bytes,6,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"`
	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
	XXX_unrecognized     []byte               `json:"-"`
	XXX_sizecache        int32                `json:"-"`
}

func (*Event) Descriptor

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

func (*Event) GetEndTime

func (m *Event) GetEndTime() *timestamp.Timestamp

func (*Event) GetID

func (m *Event) GetID() int64

func (*Event) GetOwner

func (m *Event) GetOwner() string

func (*Event) GetStartTime

func (m *Event) GetStartTime() *timestamp.Timestamp

func (*Event) GetText

func (m *Event) GetText() string

func (*Event) GetTitle

func (m *Event) GetTitle() string

func (*Event) ProtoMessage

func (*Event) ProtoMessage()

func (*Event) Reset

func (m *Event) Reset()

func (*Event) String

func (m *Event) String() string

func (*Event) XXX_DiscardUnknown

func (m *Event) XXX_DiscardUnknown()

func (*Event) XXX_Marshal

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

func (*Event) XXX_Merge

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

func (*Event) XXX_Size

func (m *Event) XXX_Size() int

func (*Event) XXX_Unmarshal

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

type GetEventsByTimeRequest

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

func (*GetEventsByTimeRequest) Descriptor

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

func (*GetEventsByTimeRequest) GetTimeType

func (m *GetEventsByTimeRequest) GetTimeType() string

func (*GetEventsByTimeRequest) ProtoMessage

func (*GetEventsByTimeRequest) ProtoMessage()

func (*GetEventsByTimeRequest) Reset

func (m *GetEventsByTimeRequest) Reset()

func (*GetEventsByTimeRequest) String

func (m *GetEventsByTimeRequest) String() string

func (*GetEventsByTimeRequest) XXX_DiscardUnknown

func (m *GetEventsByTimeRequest) XXX_DiscardUnknown()

func (*GetEventsByTimeRequest) XXX_Marshal

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

func (*GetEventsByTimeRequest) XXX_Merge

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

func (*GetEventsByTimeRequest) XXX_Size

func (m *GetEventsByTimeRequest) XXX_Size() int

func (*GetEventsByTimeRequest) XXX_Unmarshal

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

type GetEventsByTimeResponse

type GetEventsByTimeResponse struct {
	Event                []*Event `protobuf:"bytes,1,rep,name=event,proto3" json:"event,omitempty"`
	Error                string   `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*GetEventsByTimeResponse) Descriptor

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

func (*GetEventsByTimeResponse) GetError

func (m *GetEventsByTimeResponse) GetError() string

func (*GetEventsByTimeResponse) GetEvent

func (m *GetEventsByTimeResponse) GetEvent() []*Event

func (*GetEventsByTimeResponse) ProtoMessage

func (*GetEventsByTimeResponse) ProtoMessage()

func (*GetEventsByTimeResponse) Reset

func (m *GetEventsByTimeResponse) Reset()

func (*GetEventsByTimeResponse) String

func (m *GetEventsByTimeResponse) String() string

func (*GetEventsByTimeResponse) XXX_DiscardUnknown

func (m *GetEventsByTimeResponse) XXX_DiscardUnknown()

func (*GetEventsByTimeResponse) XXX_Marshal

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

func (*GetEventsByTimeResponse) XXX_Merge

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

func (*GetEventsByTimeResponse) XXX_Size

func (m *GetEventsByTimeResponse) XXX_Size() int

func (*GetEventsByTimeResponse) XXX_Unmarshal

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

type UnimplementedCalendarServiceServer

type UnimplementedCalendarServiceServer struct {
}

UnimplementedCalendarServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedCalendarServiceServer) CreateEvent

func (*UnimplementedCalendarServiceServer) DeleteEvent

func (*UnimplementedCalendarServiceServer) GetEventsByTime

func (*UnimplementedCalendarServiceServer) UpdateEvent

type UpdateEventRequest

type UpdateEventRequest struct {
	ID                   int64                `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"`
	Title                string               `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
	Text                 string               `protobuf:"bytes,3,opt,name=text,proto3" json:"text,omitempty"`
	Owner                string               `protobuf:"bytes,4,opt,name=owner,proto3" json:"owner,omitempty"`
	StartTime            *timestamp.Timestamp `protobuf:"bytes,5,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"`
	EndTime              *timestamp.Timestamp `protobuf:"bytes,6,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"`
	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
	XXX_unrecognized     []byte               `json:"-"`
	XXX_sizecache        int32                `json:"-"`
}

func (*UpdateEventRequest) Descriptor

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

func (*UpdateEventRequest) GetEndTime

func (m *UpdateEventRequest) GetEndTime() *timestamp.Timestamp

func (*UpdateEventRequest) GetID

func (m *UpdateEventRequest) GetID() int64

func (*UpdateEventRequest) GetOwner

func (m *UpdateEventRequest) GetOwner() string

func (*UpdateEventRequest) GetStartTime

func (m *UpdateEventRequest) GetStartTime() *timestamp.Timestamp

func (*UpdateEventRequest) GetText

func (m *UpdateEventRequest) GetText() string

func (*UpdateEventRequest) GetTitle

func (m *UpdateEventRequest) GetTitle() string

func (*UpdateEventRequest) ProtoMessage

func (*UpdateEventRequest) ProtoMessage()

func (*UpdateEventRequest) Reset

func (m *UpdateEventRequest) Reset()

func (*UpdateEventRequest) String

func (m *UpdateEventRequest) String() string

func (*UpdateEventRequest) XXX_DiscardUnknown

func (m *UpdateEventRequest) XXX_DiscardUnknown()

func (*UpdateEventRequest) XXX_Marshal

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

func (*UpdateEventRequest) XXX_Merge

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

func (*UpdateEventRequest) XXX_Size

func (m *UpdateEventRequest) XXX_Size() int

func (*UpdateEventRequest) XXX_Unmarshal

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

type UpdateEventResponse

type UpdateEventResponse struct {
	// Types that are valid to be assigned to Result:
	//	*UpdateEventResponse_Event
	//	*UpdateEventResponse_Error
	Result               isUpdateEventResponse_Result `protobuf_oneof:"result"`
	XXX_NoUnkeyedLiteral struct{}                     `json:"-"`
	XXX_unrecognized     []byte                       `json:"-"`
	XXX_sizecache        int32                        `json:"-"`
}

func (*UpdateEventResponse) Descriptor

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

func (*UpdateEventResponse) GetError

func (m *UpdateEventResponse) GetError() string

func (*UpdateEventResponse) GetEvent

func (m *UpdateEventResponse) GetEvent() *Event

func (*UpdateEventResponse) GetResult

func (m *UpdateEventResponse) GetResult() isUpdateEventResponse_Result

func (*UpdateEventResponse) ProtoMessage

func (*UpdateEventResponse) ProtoMessage()

func (*UpdateEventResponse) Reset

func (m *UpdateEventResponse) Reset()

func (*UpdateEventResponse) String

func (m *UpdateEventResponse) String() string

func (*UpdateEventResponse) XXX_DiscardUnknown

func (m *UpdateEventResponse) XXX_DiscardUnknown()

func (*UpdateEventResponse) XXX_Marshal

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

func (*UpdateEventResponse) XXX_Merge

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

func (*UpdateEventResponse) XXX_OneofWrappers

func (*UpdateEventResponse) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*UpdateEventResponse) XXX_Size

func (m *UpdateEventResponse) XXX_Size() int

func (*UpdateEventResponse) XXX_Unmarshal

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

type UpdateEventResponse_Error

type UpdateEventResponse_Error struct {
	Error string `protobuf:"bytes,2,opt,name=error,proto3,oneof"`
}

type UpdateEventResponse_Event

type UpdateEventResponse_Event struct {
	Event *Event `protobuf:"bytes,1,opt,name=event,proto3,oneof"`
}

Jump to

Keyboard shortcuts

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