proto

package
v0.0.0-...-b36981d Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

README

protoc --proto_path=. --go_out=plugins=grpc:. ./pkg/event/proto/*.proto

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PublishedStatus_name = map[int32]string{
	0: "PublishedStatus_UNSPECIFIED",
	1: "PublishedStatus_Draft",
	2: "PublishedStatus_Published",
}
View Source
var PublishedStatus_value = map[string]int32{
	"PublishedStatus_UNSPECIFIED": 0,
	"PublishedStatus_Draft":       1,
	"PublishedStatus_Published":   2,
}

Functions

func RegisterEventServiceServer

func RegisterEventServiceServer(s *grpc.Server, srv EventServiceServer)

Types

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"`
	Description          string               `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
	PublishedStatus      PublishedStatus      `` /* 134-byte string literal not displayed */
	CreatedAt            *timestamp.Timestamp `protobuf:"bytes,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	UpdatedAt            *timestamp.Timestamp `protobuf:"bytes,6,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
	XXX_unrecognized     []byte               `json:"-"`
	XXX_sizecache        int32                `json:"-"`
}

func (*Event) Descriptor

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

func (*Event) GetCreatedAt

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

func (*Event) GetDescription

func (m *Event) GetDescription() string

func (*Event) GetId

func (m *Event) GetId() int64

func (*Event) GetPublishedStatus

func (m *Event) GetPublishedStatus() PublishedStatus

func (*Event) GetTitle

func (m *Event) GetTitle() string

func (*Event) GetUpdatedAt

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

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 (dst *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 EventServiceClient

type EventServiceClient interface {
	GetEvents(ctx context.Context, in *GetEventsRequest, opts ...grpc.CallOption) (*GetEventsResponse, error)
	UpdatePublishStatus(ctx context.Context, in *UpdatePublishStatusRequest, opts ...grpc.CallOption) (*empty.Empty, error)
}

EventServiceClient is the client API for EventService service.

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

func NewEventServiceClient

func NewEventServiceClient(cc *grpc.ClientConn) EventServiceClient

type EventServiceServer

type EventServiceServer interface {
	GetEvents(context.Context, *GetEventsRequest) (*GetEventsResponse, error)
	UpdatePublishStatus(context.Context, *UpdatePublishStatusRequest) (*empty.Empty, error)
}

EventServiceServer is the server API for EventService service.

type GetEventsRequest

type GetEventsRequest 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"`
	PublishedStatus      PublishedStatus      `` /* 134-byte string literal not displayed */
	CreatedAt            *timestamp.Timestamp `protobuf:"bytes,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
	XXX_unrecognized     []byte               `json:"-"`
	XXX_sizecache        int32                `json:"-"`
}

func (*GetEventsRequest) Descriptor

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

func (*GetEventsRequest) GetCreatedAt

func (m *GetEventsRequest) GetCreatedAt() *timestamp.Timestamp

func (*GetEventsRequest) GetId

func (m *GetEventsRequest) GetId() int64

func (*GetEventsRequest) GetPublishedStatus

func (m *GetEventsRequest) GetPublishedStatus() PublishedStatus

func (*GetEventsRequest) GetTitle

func (m *GetEventsRequest) GetTitle() string

func (*GetEventsRequest) ProtoMessage

func (*GetEventsRequest) ProtoMessage()

func (*GetEventsRequest) Reset

func (m *GetEventsRequest) Reset()

func (*GetEventsRequest) String

func (m *GetEventsRequest) String() string

func (*GetEventsRequest) XXX_DiscardUnknown

func (m *GetEventsRequest) XXX_DiscardUnknown()

func (*GetEventsRequest) XXX_Marshal

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

func (*GetEventsRequest) XXX_Merge

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

func (*GetEventsRequest) XXX_Size

func (m *GetEventsRequest) XXX_Size() int

func (*GetEventsRequest) XXX_Unmarshal

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

type GetEventsResponse

type GetEventsResponse struct {
	Events               []*Event `protobuf:"bytes,1,rep,name=Events,proto3" json:"Events,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*GetEventsResponse) Descriptor

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

func (*GetEventsResponse) GetEvents

func (m *GetEventsResponse) GetEvents() []*Event

func (*GetEventsResponse) ProtoMessage

func (*GetEventsResponse) ProtoMessage()

func (*GetEventsResponse) Reset

func (m *GetEventsResponse) Reset()

func (*GetEventsResponse) String

func (m *GetEventsResponse) String() string

func (*GetEventsResponse) XXX_DiscardUnknown

func (m *GetEventsResponse) XXX_DiscardUnknown()

func (*GetEventsResponse) XXX_Marshal

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

func (*GetEventsResponse) XXX_Merge

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

func (*GetEventsResponse) XXX_Size

func (m *GetEventsResponse) XXX_Size() int

func (*GetEventsResponse) XXX_Unmarshal

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

type PublishedStatus

type PublishedStatus int32
const (
	PublishedStatus_PublishedStatus_UNSPECIFIED PublishedStatus = 0
	PublishedStatus_PublishedStatus_Draft       PublishedStatus = 1
	PublishedStatus_PublishedStatus_Published   PublishedStatus = 2
)

func (PublishedStatus) EnumDescriptor

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

func (PublishedStatus) String

func (x PublishedStatus) String() string

type UpdatePublishStatusRequest

type UpdatePublishStatusRequest struct {
	EventId              int64           `protobuf:"varint,1,opt,name=event_id,json=eventId,proto3" json:"event_id,omitempty"`
	TransId              string          `protobuf:"bytes,2,opt,name=trans_id,json=transId,proto3" json:"trans_id,omitempty"`
	PublishedStatus      PublishedStatus `` /* 134-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{}        `json:"-"`
	XXX_unrecognized     []byte          `json:"-"`
	XXX_sizecache        int32           `json:"-"`
}

func (*UpdatePublishStatusRequest) Descriptor

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

func (*UpdatePublishStatusRequest) GetEventId

func (m *UpdatePublishStatusRequest) GetEventId() int64

func (*UpdatePublishStatusRequest) GetPublishedStatus

func (m *UpdatePublishStatusRequest) GetPublishedStatus() PublishedStatus

func (*UpdatePublishStatusRequest) GetTransId

func (m *UpdatePublishStatusRequest) GetTransId() string

func (*UpdatePublishStatusRequest) ProtoMessage

func (*UpdatePublishStatusRequest) ProtoMessage()

func (*UpdatePublishStatusRequest) Reset

func (m *UpdatePublishStatusRequest) Reset()

func (*UpdatePublishStatusRequest) String

func (m *UpdatePublishStatusRequest) String() string

func (*UpdatePublishStatusRequest) XXX_DiscardUnknown

func (m *UpdatePublishStatusRequest) XXX_DiscardUnknown()

func (*UpdatePublishStatusRequest) XXX_Marshal

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

func (*UpdatePublishStatusRequest) XXX_Merge

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

func (*UpdatePublishStatusRequest) XXX_Size

func (m *UpdatePublishStatusRequest) XXX_Size() int

func (*UpdatePublishStatusRequest) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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