Documentation ¶
Index ¶
- Variables
- type AdminView
- type ModifySeatRequest
- func (*ModifySeatRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ModifySeatRequest) GetNewSeatNumber() int32
- func (x *ModifySeatRequest) GetSectionType() Section_SectionType
- func (x *ModifySeatRequest) GetUser() *User
- func (*ModifySeatRequest) ProtoMessage()
- func (x *ModifySeatRequest) ProtoReflect() protoreflect.Message
- func (x *ModifySeatRequest) Reset()
- func (x *ModifySeatRequest) String() string
- type ModifySeatResponse
- func (*ModifySeatResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ModifySeatResponse) GetReceipt() *Receipt
- func (*ModifySeatResponse) ProtoMessage()
- func (x *ModifySeatResponse) ProtoReflect() protoreflect.Message
- func (x *ModifySeatResponse) Reset()
- func (x *ModifySeatResponse) String() string
- type PurchaseTicketRequest
- func (*PurchaseTicketRequest) Descriptor() ([]byte, []int)deprecated
- func (x *PurchaseTicketRequest) GetTicket() *Ticket
- func (*PurchaseTicketRequest) ProtoMessage()
- func (x *PurchaseTicketRequest) ProtoReflect() protoreflect.Message
- func (x *PurchaseTicketRequest) Reset()
- func (x *PurchaseTicketRequest) String() string
- type PurchaseTicketResponse
- func (*PurchaseTicketResponse) Descriptor() ([]byte, []int)deprecated
- func (x *PurchaseTicketResponse) GetReceipt() *Receipt
- func (*PurchaseTicketResponse) ProtoMessage()
- func (x *PurchaseTicketResponse) ProtoReflect() protoreflect.Message
- func (x *PurchaseTicketResponse) Reset()
- func (x *PurchaseTicketResponse) String() string
- type Receipt
- type RemoveUserRequest
- type RemoveUserResponse
- func (*RemoveUserResponse) Descriptor() ([]byte, []int)deprecated
- func (x *RemoveUserResponse) GetReceipt() *Receipt
- func (*RemoveUserResponse) ProtoMessage()
- func (x *RemoveUserResponse) ProtoReflect() protoreflect.Message
- func (x *RemoveUserResponse) Reset()
- func (x *RemoveUserResponse) String() string
- type Seat
- type Section
- type Section_SectionType
- func (Section_SectionType) Descriptor() protoreflect.EnumDescriptor
- func (x Section_SectionType) Enum() *Section_SectionType
- func (Section_SectionType) EnumDescriptor() ([]byte, []int)deprecated
- func (x Section_SectionType) Number() protoreflect.EnumNumber
- func (x Section_SectionType) String() string
- func (Section_SectionType) Type() protoreflect.EnumType
- type Ticket
- func (*Ticket) Descriptor() ([]byte, []int)deprecated
- func (x *Ticket) GetFrom() string
- func (x *Ticket) GetPricePaid() float32
- func (x *Ticket) GetTo() string
- func (x *Ticket) GetUser() *User
- func (*Ticket) ProtoMessage()
- func (x *Ticket) ProtoReflect() protoreflect.Message
- func (x *Ticket) Reset()
- func (x *Ticket) String() string
- type User
- type ViewAdminDetailsRequest
- func (*ViewAdminDetailsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ViewAdminDetailsRequest) GetSection() *Section
- func (*ViewAdminDetailsRequest) ProtoMessage()
- func (x *ViewAdminDetailsRequest) ProtoReflect() protoreflect.Message
- func (x *ViewAdminDetailsRequest) Reset()
- func (x *ViewAdminDetailsRequest) String() string
- type ViewAdminDetailsResponse
- func (*ViewAdminDetailsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ViewAdminDetailsResponse) GetAdminView() *AdminView
- func (*ViewAdminDetailsResponse) ProtoMessage()
- func (x *ViewAdminDetailsResponse) ProtoReflect() protoreflect.Message
- func (x *ViewAdminDetailsResponse) Reset()
- func (x *ViewAdminDetailsResponse) String() string
- type ViewReceiptRequest
- func (*ViewReceiptRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ViewReceiptRequest) GetTicket() *Ticket
- func (*ViewReceiptRequest) ProtoMessage()
- func (x *ViewReceiptRequest) ProtoReflect() protoreflect.Message
- func (x *ViewReceiptRequest) Reset()
- func (x *ViewReceiptRequest) String() string
- type ViewReceiptResponse
- func (*ViewReceiptResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ViewReceiptResponse) GetReceipt() *Receipt
- func (*ViewReceiptResponse) ProtoMessage()
- func (x *ViewReceiptResponse) ProtoReflect() protoreflect.Message
- func (x *ViewReceiptResponse) Reset()
- func (x *ViewReceiptResponse) String() string
Constants ¶
This section is empty.
Variables ¶
var ( Section_SectionType_name = map[int32]string{ 0: "SECTION_TYPE_UNSPECIFIED", 1: "SECTION_TYPE_A", 2: "SECTION_TYPE_B", } Section_SectionType_value = map[string]int32{ "SECTION_TYPE_UNSPECIFIED": 0, "SECTION_TYPE_A": 1, "SECTION_TYPE_B": 2, } )
Enum value maps for Section_SectionType.
var File_tests_go_samples_train_ticketing_v1_ticketing_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type AdminView ¶
type AdminView struct { Users []*User `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"` Seats []*Seat `protobuf:"bytes,2,rep,name=seats,proto3" json:"seats,omitempty"` // contains filtered or unexported fields }
Message for admin view
func (*AdminView) Descriptor
deprecated
func (*AdminView) ProtoMessage ¶
func (*AdminView) ProtoMessage()
func (*AdminView) ProtoReflect ¶
func (x *AdminView) ProtoReflect() protoreflect.Message
type ModifySeatRequest ¶
type ModifySeatRequest struct { User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` SectionType Section_SectionType `` /* 156-byte string literal not displayed */ NewSeatNumber int32 `protobuf:"varint,3,opt,name=new_seat_number,json=newSeatNumber,proto3" json:"new_seat_number,omitempty"` // contains filtered or unexported fields }
Message for modify user's seat request
func (*ModifySeatRequest) Descriptor
deprecated
func (*ModifySeatRequest) Descriptor() ([]byte, []int)
Deprecated: Use ModifySeatRequest.ProtoReflect.Descriptor instead.
func (*ModifySeatRequest) GetNewSeatNumber ¶
func (x *ModifySeatRequest) GetNewSeatNumber() int32
func (*ModifySeatRequest) GetSectionType ¶
func (x *ModifySeatRequest) GetSectionType() Section_SectionType
func (*ModifySeatRequest) GetUser ¶
func (x *ModifySeatRequest) GetUser() *User
func (*ModifySeatRequest) ProtoMessage ¶
func (*ModifySeatRequest) ProtoMessage()
func (*ModifySeatRequest) ProtoReflect ¶
func (x *ModifySeatRequest) ProtoReflect() protoreflect.Message
func (*ModifySeatRequest) Reset ¶
func (x *ModifySeatRequest) Reset()
func (*ModifySeatRequest) String ¶
func (x *ModifySeatRequest) String() string
type ModifySeatResponse ¶
type ModifySeatResponse struct { Receipt *Receipt `protobuf:"bytes,1,opt,name=receipt,proto3" json:"receipt,omitempty"` // contains filtered or unexported fields }
func (*ModifySeatResponse) Descriptor
deprecated
func (*ModifySeatResponse) Descriptor() ([]byte, []int)
Deprecated: Use ModifySeatResponse.ProtoReflect.Descriptor instead.
func (*ModifySeatResponse) GetReceipt ¶
func (x *ModifySeatResponse) GetReceipt() *Receipt
func (*ModifySeatResponse) ProtoMessage ¶
func (*ModifySeatResponse) ProtoMessage()
func (*ModifySeatResponse) ProtoReflect ¶
func (x *ModifySeatResponse) ProtoReflect() protoreflect.Message
func (*ModifySeatResponse) Reset ¶
func (x *ModifySeatResponse) Reset()
func (*ModifySeatResponse) String ¶
func (x *ModifySeatResponse) String() string
type PurchaseTicketRequest ¶
type PurchaseTicketRequest struct { Ticket *Ticket `protobuf:"bytes,1,opt,name=ticket,proto3" json:"ticket,omitempty"` // contains filtered or unexported fields }
Request and response types for RPC methods
func (*PurchaseTicketRequest) Descriptor
deprecated
func (*PurchaseTicketRequest) Descriptor() ([]byte, []int)
Deprecated: Use PurchaseTicketRequest.ProtoReflect.Descriptor instead.
func (*PurchaseTicketRequest) GetTicket ¶
func (x *PurchaseTicketRequest) GetTicket() *Ticket
func (*PurchaseTicketRequest) ProtoMessage ¶
func (*PurchaseTicketRequest) ProtoMessage()
func (*PurchaseTicketRequest) ProtoReflect ¶
func (x *PurchaseTicketRequest) ProtoReflect() protoreflect.Message
func (*PurchaseTicketRequest) Reset ¶
func (x *PurchaseTicketRequest) Reset()
func (*PurchaseTicketRequest) String ¶
func (x *PurchaseTicketRequest) String() string
type PurchaseTicketResponse ¶
type PurchaseTicketResponse struct { Receipt *Receipt `protobuf:"bytes,1,opt,name=receipt,proto3" json:"receipt,omitempty"` // contains filtered or unexported fields }
func (*PurchaseTicketResponse) Descriptor
deprecated
func (*PurchaseTicketResponse) Descriptor() ([]byte, []int)
Deprecated: Use PurchaseTicketResponse.ProtoReflect.Descriptor instead.
func (*PurchaseTicketResponse) GetReceipt ¶
func (x *PurchaseTicketResponse) GetReceipt() *Receipt
func (*PurchaseTicketResponse) ProtoMessage ¶
func (*PurchaseTicketResponse) ProtoMessage()
func (*PurchaseTicketResponse) ProtoReflect ¶
func (x *PurchaseTicketResponse) ProtoReflect() protoreflect.Message
func (*PurchaseTicketResponse) Reset ¶
func (x *PurchaseTicketResponse) Reset()
func (*PurchaseTicketResponse) String ¶
func (x *PurchaseTicketResponse) String() string
type Receipt ¶
type Receipt struct { Ticket *Ticket `protobuf:"bytes,1,opt,name=ticket,proto3" json:"ticket,omitempty"` // contains filtered or unexported fields }
Message for a receipt
func (*Receipt) Descriptor
deprecated
func (*Receipt) ProtoMessage ¶
func (*Receipt) ProtoMessage()
func (*Receipt) ProtoReflect ¶
func (x *Receipt) ProtoReflect() protoreflect.Message
type RemoveUserRequest ¶
type RemoveUserRequest struct { User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` // contains filtered or unexported fields }
Message for remove user request
func (*RemoveUserRequest) Descriptor
deprecated
func (*RemoveUserRequest) Descriptor() ([]byte, []int)
Deprecated: Use RemoveUserRequest.ProtoReflect.Descriptor instead.
func (*RemoveUserRequest) GetUser ¶
func (x *RemoveUserRequest) GetUser() *User
func (*RemoveUserRequest) ProtoMessage ¶
func (*RemoveUserRequest) ProtoMessage()
func (*RemoveUserRequest) ProtoReflect ¶
func (x *RemoveUserRequest) ProtoReflect() protoreflect.Message
func (*RemoveUserRequest) Reset ¶
func (x *RemoveUserRequest) Reset()
func (*RemoveUserRequest) String ¶
func (x *RemoveUserRequest) String() string
type RemoveUserResponse ¶
type RemoveUserResponse struct { Receipt *Receipt `protobuf:"bytes,1,opt,name=receipt,proto3" json:"receipt,omitempty"` // contains filtered or unexported fields }
func (*RemoveUserResponse) Descriptor
deprecated
func (*RemoveUserResponse) Descriptor() ([]byte, []int)
Deprecated: Use RemoveUserResponse.ProtoReflect.Descriptor instead.
func (*RemoveUserResponse) GetReceipt ¶
func (x *RemoveUserResponse) GetReceipt() *Receipt
func (*RemoveUserResponse) ProtoMessage ¶
func (*RemoveUserResponse) ProtoMessage()
func (*RemoveUserResponse) ProtoReflect ¶
func (x *RemoveUserResponse) ProtoReflect() protoreflect.Message
func (*RemoveUserResponse) Reset ¶
func (x *RemoveUserResponse) Reset()
func (*RemoveUserResponse) String ¶
func (x *RemoveUserResponse) String() string
type Seat ¶
type Seat struct { SeatNumber int32 `protobuf:"varint,1,opt,name=seat_number,json=seatNumber,proto3" json:"seat_number,omitempty"` // contains filtered or unexported fields }
Message for a seat in a section
func (*Seat) Descriptor
deprecated
func (*Seat) GetSeatNumber ¶
func (*Seat) ProtoMessage ¶
func (*Seat) ProtoMessage()
func (*Seat) ProtoReflect ¶
func (x *Seat) ProtoReflect() protoreflect.Message
type Section ¶
type Section struct { SectionType Section_SectionType `` /* 156-byte string literal not displayed */ Seats []*Seat `protobuf:"bytes,2,rep,name=seats,proto3" json:"seats,omitempty"` // contains filtered or unexported fields }
Message for a section in the train
func (*Section) Descriptor
deprecated
func (*Section) GetSectionType ¶
func (x *Section) GetSectionType() Section_SectionType
func (*Section) ProtoMessage ¶
func (*Section) ProtoMessage()
func (*Section) ProtoReflect ¶
func (x *Section) ProtoReflect() protoreflect.Message
type Section_SectionType ¶
type Section_SectionType int32
const ( Section_SECTION_TYPE_UNSPECIFIED Section_SectionType = 0 Section_SECTION_TYPE_A Section_SectionType = 1 Section_SECTION_TYPE_B Section_SectionType = 2 )
func (Section_SectionType) Descriptor ¶
func (Section_SectionType) Descriptor() protoreflect.EnumDescriptor
func (Section_SectionType) Enum ¶
func (x Section_SectionType) Enum() *Section_SectionType
func (Section_SectionType) EnumDescriptor
deprecated
func (Section_SectionType) EnumDescriptor() ([]byte, []int)
Deprecated: Use Section_SectionType.Descriptor instead.
func (Section_SectionType) Number ¶
func (x Section_SectionType) Number() protoreflect.EnumNumber
func (Section_SectionType) String ¶
func (x Section_SectionType) String() string
func (Section_SectionType) Type ¶
func (Section_SectionType) Type() protoreflect.EnumType
type Ticket ¶
type Ticket struct { From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` To string `protobuf:"bytes,2,opt,name=to,proto3" json:"to,omitempty"` User *User `protobuf:"bytes,3,opt,name=user,proto3" json:"user,omitempty"` PricePaid float32 `protobuf:"fixed32,4,opt,name=price_paid,json=pricePaid,proto3" json:"price_paid,omitempty"` // contains filtered or unexported fields }
Message for a train ticket
func (*Ticket) Descriptor
deprecated
func (*Ticket) GetPricePaid ¶
func (*Ticket) ProtoMessage ¶
func (*Ticket) ProtoMessage()
func (*Ticket) ProtoReflect ¶
func (x *Ticket) ProtoReflect() protoreflect.Message
type User ¶
type User struct { FirstName string `protobuf:"bytes,1,opt,name=first_name,json=firstName,proto3" json:"first_name,omitempty"` LastName string `protobuf:"bytes,2,opt,name=last_name,json=lastName,proto3" json:"last_name,omitempty"` Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"` // contains filtered or unexported fields }
Message for a user's information
func (*User) Descriptor
deprecated
func (*User) GetFirstName ¶
func (*User) GetLastName ¶
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶
func (x *User) ProtoReflect() protoreflect.Message
type ViewAdminDetailsRequest ¶
type ViewAdminDetailsRequest struct { Section *Section `protobuf:"bytes,1,opt,name=section,proto3" json:"section,omitempty"` // contains filtered or unexported fields }
func (*ViewAdminDetailsRequest) Descriptor
deprecated
func (*ViewAdminDetailsRequest) Descriptor() ([]byte, []int)
Deprecated: Use ViewAdminDetailsRequest.ProtoReflect.Descriptor instead.
func (*ViewAdminDetailsRequest) GetSection ¶
func (x *ViewAdminDetailsRequest) GetSection() *Section
func (*ViewAdminDetailsRequest) ProtoMessage ¶
func (*ViewAdminDetailsRequest) ProtoMessage()
func (*ViewAdminDetailsRequest) ProtoReflect ¶
func (x *ViewAdminDetailsRequest) ProtoReflect() protoreflect.Message
func (*ViewAdminDetailsRequest) Reset ¶
func (x *ViewAdminDetailsRequest) Reset()
func (*ViewAdminDetailsRequest) String ¶
func (x *ViewAdminDetailsRequest) String() string
type ViewAdminDetailsResponse ¶
type ViewAdminDetailsResponse struct { AdminView *AdminView `protobuf:"bytes,1,opt,name=admin_view,json=adminView,proto3" json:"admin_view,omitempty"` // contains filtered or unexported fields }
func (*ViewAdminDetailsResponse) Descriptor
deprecated
func (*ViewAdminDetailsResponse) Descriptor() ([]byte, []int)
Deprecated: Use ViewAdminDetailsResponse.ProtoReflect.Descriptor instead.
func (*ViewAdminDetailsResponse) GetAdminView ¶
func (x *ViewAdminDetailsResponse) GetAdminView() *AdminView
func (*ViewAdminDetailsResponse) ProtoMessage ¶
func (*ViewAdminDetailsResponse) ProtoMessage()
func (*ViewAdminDetailsResponse) ProtoReflect ¶
func (x *ViewAdminDetailsResponse) ProtoReflect() protoreflect.Message
func (*ViewAdminDetailsResponse) Reset ¶
func (x *ViewAdminDetailsResponse) Reset()
func (*ViewAdminDetailsResponse) String ¶
func (x *ViewAdminDetailsResponse) String() string
type ViewReceiptRequest ¶
type ViewReceiptRequest struct { Ticket *Ticket `protobuf:"bytes,1,opt,name=ticket,proto3" json:"ticket,omitempty"` // contains filtered or unexported fields }
func (*ViewReceiptRequest) Descriptor
deprecated
func (*ViewReceiptRequest) Descriptor() ([]byte, []int)
Deprecated: Use ViewReceiptRequest.ProtoReflect.Descriptor instead.
func (*ViewReceiptRequest) GetTicket ¶
func (x *ViewReceiptRequest) GetTicket() *Ticket
func (*ViewReceiptRequest) ProtoMessage ¶
func (*ViewReceiptRequest) ProtoMessage()
func (*ViewReceiptRequest) ProtoReflect ¶
func (x *ViewReceiptRequest) ProtoReflect() protoreflect.Message
func (*ViewReceiptRequest) Reset ¶
func (x *ViewReceiptRequest) Reset()
func (*ViewReceiptRequest) String ¶
func (x *ViewReceiptRequest) String() string
type ViewReceiptResponse ¶
type ViewReceiptResponse struct { Receipt *Receipt `protobuf:"bytes,1,opt,name=receipt,proto3" json:"receipt,omitempty"` // contains filtered or unexported fields }
func (*ViewReceiptResponse) Descriptor
deprecated
func (*ViewReceiptResponse) Descriptor() ([]byte, []int)
Deprecated: Use ViewReceiptResponse.ProtoReflect.Descriptor instead.
func (*ViewReceiptResponse) GetReceipt ¶
func (x *ViewReceiptResponse) GetReceipt() *Receipt
func (*ViewReceiptResponse) ProtoMessage ¶
func (*ViewReceiptResponse) ProtoMessage()
func (*ViewReceiptResponse) ProtoReflect ¶
func (x *ViewReceiptResponse) ProtoReflect() protoreflect.Message
func (*ViewReceiptResponse) Reset ¶
func (x *ViewReceiptResponse) Reset()
func (*ViewReceiptResponse) String ¶
func (x *ViewReceiptResponse) String() string