Add status
This commit is contained in:
parent
be9ee8372f
commit
da16c90fc3
|
@ -0,0 +1,27 @@
|
||||||
|
FROM golang:alpine as builder
|
||||||
|
|
||||||
|
ARG ACCESS_TOKEN_USR="nothing"
|
||||||
|
ARG ACCESS_TOKEN_PWD="nothing"
|
||||||
|
|
||||||
|
RUN apk add --no-cache ca-certificates tzdata
|
||||||
|
|
||||||
|
WORKDIR /
|
||||||
|
|
||||||
|
# Create a netrc file using the credentials specified using --build-arg
|
||||||
|
RUN printf "machine git.coopgo.io\n\
|
||||||
|
login ${ACCESS_TOKEN_USR}\n\
|
||||||
|
password ${ACCESS_TOKEN_PWD}\n"\
|
||||||
|
>> ~/.netrc
|
||||||
|
RUN chmod 600 ~/.netrc
|
||||||
|
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
RUN go mod download && CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o /server
|
||||||
|
|
||||||
|
FROM scratch
|
||||||
|
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
|
||||||
|
COPY --from=builder /usr/share/zoneinfo /usr/share/zoneinfo
|
||||||
|
COPY --from=builder /server /
|
||||||
|
|
||||||
|
EXPOSE 8080
|
||||||
|
ENTRYPOINT ["/server"]
|
|
@ -217,6 +217,10 @@ type GetVehiclesRequest struct {
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
Namespaces []string `protobuf:"bytes,5,rep,name=namespaces,proto3" json:"namespaces,omitempty"`
|
Namespaces []string `protobuf:"bytes,5,rep,name=namespaces,proto3" json:"namespaces,omitempty"`
|
||||||
|
Types []string `protobuf:"bytes,6,rep,name=types,proto3" json:"types,omitempty"`
|
||||||
|
Administrators []string `protobuf:"bytes,7,rep,name=administrators,proto3" json:"administrators,omitempty"`
|
||||||
|
AvailabilityFrom *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=availability_from,json=availabilityFrom,proto3" json:"availability_from,omitempty"`
|
||||||
|
AvailabilityTo *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=availability_to,json=availabilityTo,proto3" json:"availability_to,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *GetVehiclesRequest) Reset() {
|
func (x *GetVehiclesRequest) Reset() {
|
||||||
|
@ -258,6 +262,34 @@ func (x *GetVehiclesRequest) GetNamespaces() []string {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (x *GetVehiclesRequest) GetTypes() []string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Types
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetVehiclesRequest) GetAdministrators() []string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Administrators
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetVehiclesRequest) GetAvailabilityFrom() *timestamppb.Timestamp {
|
||||||
|
if x != nil {
|
||||||
|
return x.AvailabilityFrom
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetVehiclesRequest) GetAvailabilityTo() *timestamppb.Timestamp {
|
||||||
|
if x != nil {
|
||||||
|
return x.AvailabilityTo
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
type GetVehiclesResponse struct {
|
type GetVehiclesResponse struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
|
@ -1204,135 +1236,147 @@ var file_fleets_proto_rawDesc = []byte{
|
||||||
0x63, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x07, 0x76,
|
0x63, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x07, 0x76,
|
||||||
0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x56,
|
0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x56,
|
||||||
0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x52, 0x07, 0x76, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x22,
|
0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x52, 0x07, 0x76, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x22,
|
||||||
0x34, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x56, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x73, 0x52, 0x65,
|
0x80, 0x02, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x56, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x73, 0x52,
|
||||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61,
|
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70,
|
||||||
0x63, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x6e, 0x61, 0x6d, 0x65, 0x73,
|
0x61, 0x63, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x6e, 0x61, 0x6d, 0x65,
|
||||||
0x70, 0x61, 0x63, 0x65, 0x73, 0x22, 0x3b, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x56, 0x65, 0x68, 0x69,
|
0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18,
|
||||||
0x63, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x24, 0x0a, 0x08,
|
0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x74, 0x79, 0x70, 0x65, 0x73, 0x12, 0x26, 0x0a, 0x0e,
|
||||||
0x76, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x08,
|
0x61, 0x64, 0x6d, 0x69, 0x6e, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x07,
|
||||||
0x2e, 0x56, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x52, 0x08, 0x76, 0x65, 0x68, 0x69, 0x63, 0x6c,
|
0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x69, 0x73, 0x74, 0x72, 0x61,
|
||||||
0x65, 0x73, 0x22, 0x3b, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x56, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65,
|
0x74, 0x6f, 0x72, 0x73, 0x12, 0x47, 0x0a, 0x11, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69,
|
||||||
0x73, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a,
|
0x6c, 0x69, 0x74, 0x79, 0x5f, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
||||||
0x0b, 0x76, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x73, 0x69, 0x64, 0x73, 0x18, 0x07, 0x20, 0x03,
|
0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
|
||||||
0x28, 0x09, 0x52, 0x0b, 0x76, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x73, 0x69, 0x64, 0x73, 0x22,
|
0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x10, 0x61, 0x76, 0x61,
|
||||||
0x40, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x56, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x73, 0x42, 0x61,
|
0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x46, 0x72, 0x6f, 0x6d, 0x12, 0x43, 0x0a,
|
||||||
0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x24, 0x0a, 0x08, 0x76,
|
0x0f, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x74, 0x6f,
|
||||||
0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x08, 0x2e,
|
0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
|
||||||
0x56, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x52, 0x08, 0x76, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65,
|
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61,
|
||||||
0x73, 0x22, 0x3a, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x56, 0x65, 0x68, 0x69, 0x63,
|
0x6d, 0x70, 0x52, 0x0e, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79,
|
||||||
0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x22, 0x0a, 0x07, 0x76, 0x65, 0x68,
|
0x54, 0x6f, 0x22, 0x3b, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x56, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65,
|
||||||
0x69, 0x63, 0x6c, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x56, 0x65, 0x68,
|
0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x24, 0x0a, 0x08, 0x76, 0x65, 0x68,
|
||||||
0x69, 0x63, 0x6c, 0x65, 0x52, 0x07, 0x76, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x22, 0x3b, 0x0a,
|
0x69, 0x63, 0x6c, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x56, 0x65,
|
||||||
0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x56, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x52, 0x65,
|
0x68, 0x69, 0x63, 0x6c, 0x65, 0x52, 0x08, 0x76, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x73, 0x22,
|
||||||
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x07, 0x76, 0x65, 0x68, 0x69, 0x63, 0x6c,
|
0x3b, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x56, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x73, 0x42, 0x61,
|
||||||
0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x56, 0x65, 0x68, 0x69, 0x63, 0x6c,
|
0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x76, 0x65,
|
||||||
0x65, 0x52, 0x07, 0x76, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x22, 0x3a, 0x0a, 0x14, 0x43, 0x72,
|
0x68, 0x69, 0x63, 0x6c, 0x65, 0x73, 0x69, 0x64, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52,
|
||||||
0x65, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65,
|
0x0b, 0x76, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x73, 0x69, 0x64, 0x73, 0x22, 0x40, 0x0a, 0x18,
|
||||||
0x73, 0x74, 0x12, 0x22, 0x0a, 0x07, 0x62, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x18, 0x0b, 0x20,
|
0x47, 0x65, 0x74, 0x56, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x73, 0x42, 0x61, 0x74, 0x63, 0x68,
|
||||||
0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x62,
|
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x24, 0x0a, 0x08, 0x76, 0x65, 0x68, 0x69,
|
||||||
0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x22, 0x3b, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
|
0x63, 0x6c, 0x65, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x56, 0x65, 0x68,
|
||||||
0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
|
0x69, 0x63, 0x6c, 0x65, 0x52, 0x08, 0x76, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x73, 0x22, 0x3a,
|
||||||
0x22, 0x0a, 0x07, 0x62, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b,
|
0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x56, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x52,
|
||||||
0x32, 0x08, 0x2e, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x62, 0x6f, 0x6f, 0x6b,
|
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x22, 0x0a, 0x07, 0x76, 0x65, 0x68, 0x69, 0x63, 0x6c,
|
||||||
0x69, 0x6e, 0x67, 0x22, 0x3a, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x6f,
|
0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x56, 0x65, 0x68, 0x69, 0x63, 0x6c,
|
||||||
0x6b, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x22, 0x0a, 0x07, 0x62,
|
0x65, 0x52, 0x07, 0x76, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x22, 0x3b, 0x0a, 0x15, 0x55, 0x70,
|
||||||
0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x42,
|
|
||||||
0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x62, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x22,
|
|
||||||
0x3b, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67,
|
|
||||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x07, 0x62, 0x6f, 0x6f, 0x6b,
|
|
||||||
0x69, 0x6e, 0x67, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x42, 0x6f, 0x6f, 0x6b,
|
|
||||||
0x69, 0x6e, 0x67, 0x52, 0x07, 0x62, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x22, 0x26, 0x0a, 0x14,
|
|
||||||
0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71,
|
|
||||||
0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09,
|
|
||||||
0x52, 0x02, 0x69, 0x64, 0x22, 0x27, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x6f,
|
|
||||||
0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a,
|
|
||||||
0x02, 0x6f, 0x6b, 0x18, 0x10, 0x20, 0x01, 0x28, 0x08, 0x52, 0x02, 0x6f, 0x6b, 0x22, 0xc6, 0x01,
|
|
||||||
0x0a, 0x12, 0x46, 0x69, 0x6e, 0x64, 0x56, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x52, 0x65, 0x71,
|
|
||||||
0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63,
|
|
||||||
0x65, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61,
|
|
||||||
0x63, 0x65, 0x12, 0x38, 0x0a, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x64, 0x61, 0x74, 0x65, 0x18,
|
|
||||||
0x12, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
|
|
||||||
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d,
|
|
||||||
0x70, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x64, 0x61, 0x74, 0x65, 0x12, 0x34, 0x0a, 0x07,
|
|
||||||
0x65, 0x6e, 0x64, 0x64, 0x61, 0x74, 0x65, 0x18, 0x13, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e,
|
|
||||||
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
|
|
||||||
0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x64, 0x61,
|
|
||||||
0x74, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x61, 0x74, 0x18, 0x14, 0x20, 0x01, 0x28, 0x01, 0x52,
|
|
||||||
0x03, 0x6c, 0x61, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x6f, 0x6e, 0x18, 0x15, 0x20, 0x01, 0x28,
|
|
||||||
0x01, 0x52, 0x03, 0x6c, 0x6f, 0x6e, 0x22, 0x3b, 0x0a, 0x13, 0x46, 0x69, 0x6e, 0x64, 0x56, 0x65,
|
|
||||||
0x68, 0x69, 0x63, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x24, 0x0a,
|
|
||||||
0x08, 0x76, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x73, 0x18, 0x16, 0x20, 0x03, 0x28, 0x0b, 0x32,
|
|
||||||
0x08, 0x2e, 0x56, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x52, 0x08, 0x76, 0x65, 0x68, 0x69, 0x63,
|
|
||||||
0x6c, 0x65, 0x73, 0x22, 0x31, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e,
|
|
||||||
0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x62, 0x6f, 0x6f, 0x6b,
|
|
||||||
0x69, 0x6e, 0x67, 0x69, 0x64, 0x18, 0x17, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x6f, 0x6f,
|
|
||||||
0x6b, 0x69, 0x6e, 0x67, 0x69, 0x64, 0x22, 0x38, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x42, 0x6f, 0x6f,
|
|
||||||
0x6b, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x07,
|
|
||||||
0x62, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x18, 0x18, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e,
|
|
||||||
0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x62, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67,
|
|
||||||
0x22, 0x32, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x42, 0x6f, 0x6f,
|
|
||||||
0x6b, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06,
|
|
||||||
0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x18, 0x19, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x72,
|
|
||||||
0x69, 0x76, 0x65, 0x72, 0x22, 0x41, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x44, 0x72, 0x69, 0x76, 0x65,
|
|
||||||
0x72, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
|
||||||
0x65, 0x12, 0x24, 0x0a, 0x08, 0x62, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x1a, 0x20,
|
|
||||||
0x03, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x08, 0x62,
|
|
||||||
0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x73, 0x22, 0x34, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x42, 0x6f,
|
|
||||||
0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a,
|
|
||||||
0x0a, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x18, 0x1b, 0x20, 0x03, 0x28,
|
|
||||||
0x09, 0x52, 0x0a, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x22, 0x3b, 0x0a,
|
|
||||||
0x13, 0x47, 0x65, 0x74, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70,
|
|
||||||
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x24, 0x0a, 0x08, 0x62, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x73,
|
|
||||||
0x18, 0x1c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67,
|
|
||||||
0x52, 0x08, 0x62, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x73, 0x32, 0xbd, 0x05, 0x0a, 0x06, 0x46,
|
|
||||||
0x6c, 0x65, 0x65, 0x74, 0x73, 0x12, 0x37, 0x0a, 0x0a, 0x41, 0x64, 0x64, 0x56, 0x65, 0x68, 0x69,
|
|
||||||
0x63, 0x6c, 0x65, 0x12, 0x12, 0x2e, 0x41, 0x64, 0x64, 0x56, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65,
|
|
||||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x41, 0x64, 0x64, 0x56, 0x65, 0x68,
|
|
||||||
0x69, 0x63, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x37,
|
|
||||||
0x0a, 0x0a, 0x47, 0x65, 0x74, 0x56, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x12, 0x12, 0x2e, 0x47,
|
|
||||||
0x65, 0x74, 0x56, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
|
||||||
0x1a, 0x13, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x52, 0x65, 0x73,
|
|
||||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3a, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x56, 0x65,
|
|
||||||
0x68, 0x69, 0x63, 0x6c, 0x65, 0x73, 0x12, 0x13, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x65, 0x68, 0x69,
|
|
||||||
0x63, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x47, 0x65,
|
|
||||||
0x74, 0x56, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
|
||||||
0x65, 0x22, 0x00, 0x12, 0x40, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x56, 0x65, 0x68,
|
|
||||||
0x69, 0x63, 0x6c, 0x65, 0x12, 0x15, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x56, 0x65, 0x68,
|
|
||||||
0x69, 0x63, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x55, 0x70,
|
|
||||||
0x64, 0x61, 0x74, 0x65, 0x56, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
0x64, 0x61, 0x74, 0x65, 0x56, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||||
0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x40, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42,
|
0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x07, 0x76, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x18, 0x0a,
|
||||||
0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x12, 0x15, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42,
|
0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x56, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x52, 0x07,
|
||||||
0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e,
|
0x76, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x22, 0x3a, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74,
|
||||||
0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73,
|
0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
|
||||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x37, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x42, 0x6f,
|
0x22, 0x0a, 0x07, 0x62, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b,
|
||||||
0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x12, 0x12, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6f, 0x6f, 0x6b, 0x69,
|
0x32, 0x08, 0x2e, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x62, 0x6f, 0x6f, 0x6b,
|
||||||
0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x47, 0x65, 0x74, 0x42,
|
0x69, 0x6e, 0x67, 0x22, 0x3b, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x6f,
|
||||||
0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00,
|
0x6b, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x07,
|
||||||
0x12, 0x3a, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x73, 0x12,
|
0x62, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e,
|
||||||
0x13, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71,
|
0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x62, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67,
|
||||||
0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e,
|
0x22, 0x3a, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e,
|
||||||
0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4c, 0x0a, 0x11,
|
0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x22, 0x0a, 0x07, 0x62, 0x6f, 0x6f, 0x6b,
|
||||||
0x47, 0x65, 0x74, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67,
|
0x69, 0x6e, 0x67, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x42, 0x6f, 0x6f, 0x6b,
|
||||||
0x73, 0x12, 0x19, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x42, 0x6f, 0x6f,
|
0x69, 0x6e, 0x67, 0x52, 0x07, 0x62, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x22, 0x3b, 0x0a, 0x15,
|
||||||
0x6b, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x47,
|
0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73,
|
||||||
0x65, 0x74, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x73,
|
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x07, 0x62, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67,
|
||||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x40, 0x0a, 0x0d, 0x55, 0x70,
|
0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67,
|
||||||
0x64, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x12, 0x15, 0x2e, 0x55, 0x70,
|
0x52, 0x07, 0x62, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x22, 0x26, 0x0a, 0x14, 0x44, 0x65, 0x6c,
|
||||||
0x64, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65,
|
0x65, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||||
0x73, 0x74, 0x1a, 0x16, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x69,
|
0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69,
|
||||||
0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x40, 0x0a, 0x0d,
|
0x64, 0x22, 0x27, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x69,
|
||||||
0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x12, 0x15, 0x2e,
|
0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x6f, 0x6b,
|
||||||
0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71,
|
0x18, 0x10, 0x20, 0x01, 0x28, 0x08, 0x52, 0x02, 0x6f, 0x6b, 0x22, 0xc6, 0x01, 0x0a, 0x12, 0x46,
|
||||||
0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x6f, 0x6f,
|
0x69, 0x6e, 0x64, 0x56, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||||
0x6b, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3a,
|
0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x11,
|
||||||
0x0a, 0x0b, 0x46, 0x69, 0x6e, 0x64, 0x56, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x12, 0x13, 0x2e,
|
0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12,
|
||||||
0x46, 0x69, 0x6e, 0x64, 0x56, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65,
|
0x38, 0x0a, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x64, 0x61, 0x74, 0x65, 0x18, 0x12, 0x20, 0x01,
|
||||||
0x73, 0x74, 0x1a, 0x14, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x56, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65,
|
0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
||||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x2e, 0x5a, 0x2c, 0x67, 0x69,
|
0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09,
|
||||||
0x74, 0x2e, 0x63, 0x6f, 0x6f, 0x70, 0x67, 0x6f, 0x2e, 0x69, 0x6f, 0x2f, 0x63, 0x6f, 0x6f, 0x70,
|
0x73, 0x74, 0x61, 0x72, 0x74, 0x64, 0x61, 0x74, 0x65, 0x12, 0x34, 0x0a, 0x07, 0x65, 0x6e, 0x64,
|
||||||
0x67, 0x6f, 0x2d, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2f, 0x66, 0x6c, 0x65, 0x65,
|
0x64, 0x61, 0x74, 0x65, 0x18, 0x13, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f,
|
||||||
0x74, 0x73, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
|
0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d,
|
||||||
0x6f, 0x33,
|
0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x64, 0x61, 0x74, 0x65, 0x12,
|
||||||
|
0x10, 0x0a, 0x03, 0x6c, 0x61, 0x74, 0x18, 0x14, 0x20, 0x01, 0x28, 0x01, 0x52, 0x03, 0x6c, 0x61,
|
||||||
|
0x74, 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x6f, 0x6e, 0x18, 0x15, 0x20, 0x01, 0x28, 0x01, 0x52, 0x03,
|
||||||
|
0x6c, 0x6f, 0x6e, 0x22, 0x3b, 0x0a, 0x13, 0x46, 0x69, 0x6e, 0x64, 0x56, 0x65, 0x68, 0x69, 0x63,
|
||||||
|
0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x24, 0x0a, 0x08, 0x76, 0x65,
|
||||||
|
0x68, 0x69, 0x63, 0x6c, 0x65, 0x73, 0x18, 0x16, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x56,
|
||||||
|
0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x52, 0x08, 0x76, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x73,
|
||||||
|
0x22, 0x31, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x65,
|
||||||
|
0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x62, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67,
|
||||||
|
0x69, 0x64, 0x18, 0x17, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x6f, 0x6f, 0x6b, 0x69, 0x6e,
|
||||||
|
0x67, 0x69, 0x64, 0x22, 0x38, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e,
|
||||||
|
0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x07, 0x62, 0x6f, 0x6f,
|
||||||
|
0x6b, 0x69, 0x6e, 0x67, 0x18, 0x18, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x42, 0x6f, 0x6f,
|
||||||
|
0x6b, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x62, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x22, 0x32, 0x0a,
|
||||||
|
0x18, 0x47, 0x65, 0x74, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e,
|
||||||
|
0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x72, 0x69,
|
||||||
|
0x76, 0x65, 0x72, 0x18, 0x19, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x72, 0x69, 0x76, 0x65,
|
||||||
|
0x72, 0x22, 0x41, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x42, 0x6f,
|
||||||
|
0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x24,
|
||||||
|
0x0a, 0x08, 0x62, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x1a, 0x20, 0x03, 0x28, 0x0b,
|
||||||
|
0x32, 0x08, 0x2e, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x08, 0x62, 0x6f, 0x6f, 0x6b,
|
||||||
|
0x69, 0x6e, 0x67, 0x73, 0x22, 0x34, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x42, 0x6f, 0x6f, 0x6b, 0x69,
|
||||||
|
0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x6e, 0x61,
|
||||||
|
0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x18, 0x1b, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a,
|
||||||
|
0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x22, 0x3b, 0x0a, 0x13, 0x47, 0x65,
|
||||||
|
0x74, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||||
|
0x65, 0x12, 0x24, 0x0a, 0x08, 0x62, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x1c, 0x20,
|
||||||
|
0x03, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x08, 0x62,
|
||||||
|
0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x73, 0x32, 0xbd, 0x05, 0x0a, 0x06, 0x46, 0x6c, 0x65, 0x65,
|
||||||
|
0x74, 0x73, 0x12, 0x37, 0x0a, 0x0a, 0x41, 0x64, 0x64, 0x56, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65,
|
||||||
|
0x12, 0x12, 0x2e, 0x41, 0x64, 0x64, 0x56, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x52, 0x65, 0x71,
|
||||||
|
0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x41, 0x64, 0x64, 0x56, 0x65, 0x68, 0x69, 0x63, 0x6c,
|
||||||
|
0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x37, 0x0a, 0x0a, 0x47,
|
||||||
|
0x65, 0x74, 0x56, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x12, 0x12, 0x2e, 0x47, 0x65, 0x74, 0x56,
|
||||||
|
0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e,
|
||||||
|
0x47, 0x65, 0x74, 0x56, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||||
|
0x73, 0x65, 0x22, 0x00, 0x12, 0x3a, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x56, 0x65, 0x68, 0x69, 0x63,
|
||||||
|
0x6c, 0x65, 0x73, 0x12, 0x13, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65,
|
||||||
|
0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x65,
|
||||||
|
0x68, 0x69, 0x63, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00,
|
||||||
|
0x12, 0x40, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x56, 0x65, 0x68, 0x69, 0x63, 0x6c,
|
||||||
|
0x65, 0x12, 0x15, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x56, 0x65, 0x68, 0x69, 0x63, 0x6c,
|
||||||
|
0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74,
|
||||||
|
0x65, 0x56, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
||||||
|
0x22, 0x00, 0x12, 0x40, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b,
|
||||||
|
0x69, 0x6e, 0x67, 0x12, 0x15, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b,
|
||||||
|
0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x43, 0x72, 0x65,
|
||||||
|
0x61, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||||
|
0x73, 0x65, 0x22, 0x00, 0x12, 0x37, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x42, 0x6f, 0x6f, 0x6b, 0x69,
|
||||||
|
0x6e, 0x67, 0x12, 0x12, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x52,
|
||||||
|
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6f, 0x6f, 0x6b,
|
||||||
|
0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3a, 0x0a,
|
||||||
|
0x0b, 0x47, 0x65, 0x74, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x13, 0x2e, 0x47,
|
||||||
|
0x65, 0x74, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||||
|
0x74, 0x1a, 0x14, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x73, 0x52,
|
||||||
|
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4c, 0x0a, 0x11, 0x47, 0x65, 0x74,
|
||||||
|
0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x19,
|
||||||
|
0x2e, 0x47, 0x65, 0x74, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e,
|
||||||
|
0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x47, 0x65, 0x74, 0x44,
|
||||||
|
0x72, 0x69, 0x76, 0x65, 0x72, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73,
|
||||||
|
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x40, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74,
|
||||||
|
0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x12, 0x15, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74,
|
||||||
|
0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
|
||||||
|
0x16, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x52,
|
||||||
|
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x40, 0x0a, 0x0d, 0x44, 0x65, 0x6c,
|
||||||
|
0x65, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x12, 0x15, 0x2e, 0x44, 0x65, 0x6c,
|
||||||
|
0x65, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||||
|
0x74, 0x1a, 0x16, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e,
|
||||||
|
0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3a, 0x0a, 0x0b, 0x46,
|
||||||
|
0x69, 0x6e, 0x64, 0x56, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x12, 0x13, 0x2e, 0x46, 0x69, 0x6e,
|
||||||
|
0x64, 0x56, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
|
||||||
|
0x14, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x56, 0x65, 0x68, 0x69, 0x63, 0x6c, 0x65, 0x52, 0x65, 0x73,
|
||||||
|
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x2e, 0x5a, 0x2c, 0x67, 0x69, 0x74, 0x2e, 0x63,
|
||||||
|
0x6f, 0x6f, 0x70, 0x67, 0x6f, 0x2e, 0x69, 0x6f, 0x2f, 0x63, 0x6f, 0x6f, 0x70, 0x67, 0x6f, 0x2d,
|
||||||
|
0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2f, 0x66, 0x6c, 0x65, 0x65, 0x74, 0x73, 0x2f,
|
||||||
|
0x67, 0x72, 0x70, 0x63, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -1374,54 +1418,56 @@ var file_fleets_proto_goTypes = []interface{}{
|
||||||
(*GetBookingsRequest)(nil), // 22: GetBookingsRequest
|
(*GetBookingsRequest)(nil), // 22: GetBookingsRequest
|
||||||
(*GetBookingsResponse)(nil), // 23: GetBookingsResponse
|
(*GetBookingsResponse)(nil), // 23: GetBookingsResponse
|
||||||
(*Vehicle)(nil), // 24: Vehicle
|
(*Vehicle)(nil), // 24: Vehicle
|
||||||
(*Booking)(nil), // 25: Booking
|
(*timestamppb.Timestamp)(nil), // 25: google.protobuf.Timestamp
|
||||||
(*timestamppb.Timestamp)(nil), // 26: google.protobuf.Timestamp
|
(*Booking)(nil), // 26: Booking
|
||||||
}
|
}
|
||||||
var file_fleets_proto_depIdxs = []int32{
|
var file_fleets_proto_depIdxs = []int32{
|
||||||
24, // 0: AddVehicleRequest.vehicle:type_name -> Vehicle
|
24, // 0: AddVehicleRequest.vehicle:type_name -> Vehicle
|
||||||
24, // 1: AddVehicleResponse.vehicle:type_name -> Vehicle
|
24, // 1: AddVehicleResponse.vehicle:type_name -> Vehicle
|
||||||
24, // 2: GetVehicleResponse.vehicle:type_name -> Vehicle
|
24, // 2: GetVehicleResponse.vehicle:type_name -> Vehicle
|
||||||
24, // 3: GetVehiclesResponse.vehicles:type_name -> Vehicle
|
25, // 3: GetVehiclesRequest.availability_from:type_name -> google.protobuf.Timestamp
|
||||||
24, // 4: GetVehiclesBatchResponse.vehicles:type_name -> Vehicle
|
25, // 4: GetVehiclesRequest.availability_to:type_name -> google.protobuf.Timestamp
|
||||||
24, // 5: UpdateVehicleRequest.vehicle:type_name -> Vehicle
|
24, // 5: GetVehiclesResponse.vehicles:type_name -> Vehicle
|
||||||
24, // 6: UpdateVehicleResponse.vehicle:type_name -> Vehicle
|
24, // 6: GetVehiclesBatchResponse.vehicles:type_name -> Vehicle
|
||||||
25, // 7: CreateBookingRequest.booking:type_name -> Booking
|
24, // 7: UpdateVehicleRequest.vehicle:type_name -> Vehicle
|
||||||
25, // 8: CreateBookingResponse.booking:type_name -> Booking
|
24, // 8: UpdateVehicleResponse.vehicle:type_name -> Vehicle
|
||||||
25, // 9: UpdateBookingRequest.booking:type_name -> Booking
|
26, // 9: CreateBookingRequest.booking:type_name -> Booking
|
||||||
25, // 10: UpdateBookingResponse.booking:type_name -> Booking
|
26, // 10: CreateBookingResponse.booking:type_name -> Booking
|
||||||
26, // 11: FindVehicleRequest.startdate:type_name -> google.protobuf.Timestamp
|
26, // 11: UpdateBookingRequest.booking:type_name -> Booking
|
||||||
26, // 12: FindVehicleRequest.enddate:type_name -> google.protobuf.Timestamp
|
26, // 12: UpdateBookingResponse.booking:type_name -> Booking
|
||||||
24, // 13: FindVehicleResponse.vehicles:type_name -> Vehicle
|
25, // 13: FindVehicleRequest.startdate:type_name -> google.protobuf.Timestamp
|
||||||
25, // 14: GetBookingResponse.booking:type_name -> Booking
|
25, // 14: FindVehicleRequest.enddate:type_name -> google.protobuf.Timestamp
|
||||||
25, // 15: GetDriverBookingsResponse.bookings:type_name -> Booking
|
24, // 15: FindVehicleResponse.vehicles:type_name -> Vehicle
|
||||||
25, // 16: GetBookingsResponse.bookings:type_name -> Booking
|
26, // 16: GetBookingResponse.booking:type_name -> Booking
|
||||||
0, // 17: Fleets.AddVehicle:input_type -> AddVehicleRequest
|
26, // 17: GetDriverBookingsResponse.bookings:type_name -> Booking
|
||||||
2, // 18: Fleets.GetVehicle:input_type -> GetVehicleRequest
|
26, // 18: GetBookingsResponse.bookings:type_name -> Booking
|
||||||
4, // 19: Fleets.GetVehicles:input_type -> GetVehiclesRequest
|
0, // 19: Fleets.AddVehicle:input_type -> AddVehicleRequest
|
||||||
8, // 20: Fleets.UpdateVehicle:input_type -> UpdateVehicleRequest
|
2, // 20: Fleets.GetVehicle:input_type -> GetVehicleRequest
|
||||||
10, // 21: Fleets.CreateBooking:input_type -> CreateBookingRequest
|
4, // 21: Fleets.GetVehicles:input_type -> GetVehiclesRequest
|
||||||
18, // 22: Fleets.GetBooking:input_type -> GetBookingRequest
|
8, // 22: Fleets.UpdateVehicle:input_type -> UpdateVehicleRequest
|
||||||
22, // 23: Fleets.GetBookings:input_type -> GetBookingsRequest
|
10, // 23: Fleets.CreateBooking:input_type -> CreateBookingRequest
|
||||||
20, // 24: Fleets.GetDriverBookings:input_type -> GetDriverBookingsRequest
|
18, // 24: Fleets.GetBooking:input_type -> GetBookingRequest
|
||||||
12, // 25: Fleets.UpdateBooking:input_type -> UpdateBookingRequest
|
22, // 25: Fleets.GetBookings:input_type -> GetBookingsRequest
|
||||||
14, // 26: Fleets.DeleteBooking:input_type -> DeleteBookingRequest
|
20, // 26: Fleets.GetDriverBookings:input_type -> GetDriverBookingsRequest
|
||||||
16, // 27: Fleets.FindVehicle:input_type -> FindVehicleRequest
|
12, // 27: Fleets.UpdateBooking:input_type -> UpdateBookingRequest
|
||||||
1, // 28: Fleets.AddVehicle:output_type -> AddVehicleResponse
|
14, // 28: Fleets.DeleteBooking:input_type -> DeleteBookingRequest
|
||||||
3, // 29: Fleets.GetVehicle:output_type -> GetVehicleResponse
|
16, // 29: Fleets.FindVehicle:input_type -> FindVehicleRequest
|
||||||
5, // 30: Fleets.GetVehicles:output_type -> GetVehiclesResponse
|
1, // 30: Fleets.AddVehicle:output_type -> AddVehicleResponse
|
||||||
9, // 31: Fleets.UpdateVehicle:output_type -> UpdateVehicleResponse
|
3, // 31: Fleets.GetVehicle:output_type -> GetVehicleResponse
|
||||||
11, // 32: Fleets.CreateBooking:output_type -> CreateBookingResponse
|
5, // 32: Fleets.GetVehicles:output_type -> GetVehiclesResponse
|
||||||
19, // 33: Fleets.GetBooking:output_type -> GetBookingResponse
|
9, // 33: Fleets.UpdateVehicle:output_type -> UpdateVehicleResponse
|
||||||
23, // 34: Fleets.GetBookings:output_type -> GetBookingsResponse
|
11, // 34: Fleets.CreateBooking:output_type -> CreateBookingResponse
|
||||||
21, // 35: Fleets.GetDriverBookings:output_type -> GetDriverBookingsResponse
|
19, // 35: Fleets.GetBooking:output_type -> GetBookingResponse
|
||||||
13, // 36: Fleets.UpdateBooking:output_type -> UpdateBookingResponse
|
23, // 36: Fleets.GetBookings:output_type -> GetBookingsResponse
|
||||||
15, // 37: Fleets.DeleteBooking:output_type -> DeleteBookingResponse
|
21, // 37: Fleets.GetDriverBookings:output_type -> GetDriverBookingsResponse
|
||||||
17, // 38: Fleets.FindVehicle:output_type -> FindVehicleResponse
|
13, // 38: Fleets.UpdateBooking:output_type -> UpdateBookingResponse
|
||||||
28, // [28:39] is the sub-list for method output_type
|
15, // 39: Fleets.DeleteBooking:output_type -> DeleteBookingResponse
|
||||||
17, // [17:28] is the sub-list for method input_type
|
17, // 40: Fleets.FindVehicle:output_type -> FindVehicleResponse
|
||||||
17, // [17:17] is the sub-list for extension type_name
|
30, // [30:41] is the sub-list for method output_type
|
||||||
17, // [17:17] is the sub-list for extension extendee
|
19, // [19:30] is the sub-list for method input_type
|
||||||
0, // [0:17] is the sub-list for field type_name
|
19, // [19:19] is the sub-list for extension type_name
|
||||||
|
19, // [19:19] is the sub-list for extension extendee
|
||||||
|
0, // [0:19] is the sub-list for field type_name
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() { file_fleets_proto_init() }
|
func init() { file_fleets_proto_init() }
|
||||||
|
|
|
@ -46,6 +46,10 @@ message GetVehicleResponse {
|
||||||
|
|
||||||
message GetVehiclesRequest {
|
message GetVehiclesRequest {
|
||||||
repeated string namespaces = 5;
|
repeated string namespaces = 5;
|
||||||
|
repeated string types = 6;
|
||||||
|
repeated string administrators = 7;
|
||||||
|
google.protobuf.Timestamp availability_from = 8;
|
||||||
|
google.protobuf.Timestamp availability_to = 9;
|
||||||
}
|
}
|
||||||
|
|
||||||
message GetVehiclesResponse {
|
message GetVehiclesResponse {
|
||||||
|
|
|
@ -2,6 +2,12 @@ package storage
|
||||||
|
|
||||||
import "time"
|
import "time"
|
||||||
|
|
||||||
|
const (
|
||||||
|
StatusOld = -1
|
||||||
|
StatusOngoing = 0
|
||||||
|
StatusForthcoming = 1
|
||||||
|
)
|
||||||
|
|
||||||
type Booking struct {
|
type Booking struct {
|
||||||
ID string `json:"id" bson:"_id"`
|
ID string `json:"id" bson:"_id"`
|
||||||
Vehicleid string `json:"vehicleid"`
|
Vehicleid string `json:"vehicleid"`
|
||||||
|
@ -15,3 +21,15 @@ type Booking struct {
|
||||||
Deleted bool
|
Deleted bool
|
||||||
Vehicle Vehicle
|
Vehicle Vehicle
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (b Booking) Status() int {
|
||||||
|
now := time.Now()
|
||||||
|
|
||||||
|
if b.Enddate.Before(now) {
|
||||||
|
return StatusOld
|
||||||
|
} else if b.Startdate.After(now) {
|
||||||
|
return StatusForthcoming
|
||||||
|
} else {
|
||||||
|
return StatusOngoing
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue