train_ticketingv1

package
v0.0.0-...-a04e50b Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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.

View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use AdminView.ProtoReflect.Descriptor instead.

func (*AdminView) GetSeats

func (x *AdminView) GetSeats() []*Seat

func (*AdminView) GetUsers

func (x *AdminView) GetUsers() []*User

func (*AdminView) ProtoMessage

func (*AdminView) ProtoMessage()

func (*AdminView) ProtoReflect

func (x *AdminView) ProtoReflect() protoreflect.Message

func (*AdminView) Reset

func (x *AdminView) Reset()

func (*AdminView) String

func (x *AdminView) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Receipt.ProtoReflect.Descriptor instead.

func (*Receipt) GetTicket

func (x *Receipt) GetTicket() *Ticket

func (*Receipt) ProtoMessage

func (*Receipt) ProtoMessage()

func (*Receipt) ProtoReflect

func (x *Receipt) ProtoReflect() protoreflect.Message

func (*Receipt) Reset

func (x *Receipt) Reset()

func (*Receipt) String

func (x *Receipt) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Seat.ProtoReflect.Descriptor instead.

func (*Seat) GetSeatNumber

func (x *Seat) GetSeatNumber() int32

func (*Seat) ProtoMessage

func (*Seat) ProtoMessage()

func (*Seat) ProtoReflect

func (x *Seat) ProtoReflect() protoreflect.Message

func (*Seat) Reset

func (x *Seat) Reset()

func (*Seat) String

func (x *Seat) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Section.ProtoReflect.Descriptor instead.

func (*Section) GetSeats

func (x *Section) GetSeats() []*Seat

func (*Section) GetSectionType

func (x *Section) GetSectionType() Section_SectionType

func (*Section) ProtoMessage

func (*Section) ProtoMessage()

func (*Section) ProtoReflect

func (x *Section) ProtoReflect() protoreflect.Message

func (*Section) Reset

func (x *Section) Reset()

func (*Section) String

func (x *Section) String() string

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) Enum

func (Section_SectionType) EnumDescriptor deprecated

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

Deprecated: Use Section_SectionType.Descriptor instead.

func (Section_SectionType) Number

func (Section_SectionType) String

func (x Section_SectionType) String() string

func (Section_SectionType) Type

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) Descriptor() ([]byte, []int)

Deprecated: Use Ticket.ProtoReflect.Descriptor instead.

func (*Ticket) GetFrom

func (x *Ticket) GetFrom() string

func (*Ticket) GetPricePaid

func (x *Ticket) GetPricePaid() float32

func (*Ticket) GetTo

func (x *Ticket) GetTo() string

func (*Ticket) GetUser

func (x *Ticket) GetUser() *User

func (*Ticket) ProtoMessage

func (*Ticket) ProtoMessage()

func (*Ticket) ProtoReflect

func (x *Ticket) ProtoReflect() protoreflect.Message

func (*Ticket) Reset

func (x *Ticket) Reset()

func (*Ticket) String

func (x *Ticket) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use User.ProtoReflect.Descriptor instead.

func (*User) GetEmail

func (x *User) GetEmail() string

func (*User) GetFirstName

func (x *User) GetFirstName() string

func (*User) GetLastName

func (x *User) GetLastName() string

func (*User) ProtoMessage

func (*User) ProtoMessage()

func (*User) ProtoReflect

func (x *User) ProtoReflect() protoreflect.Message

func (*User) Reset

func (x *User) Reset()

func (*User) String

func (x *User) String() string

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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