gatev1

package
v0.0.0-...-a9153d3 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Package gatev1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Package gatev1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	GateManagerService_PostCampusGateEventCallback_FullMethodName = "/campusapis.gate.v1.GateManagerService/PostCampusGateEventCallback"
	GateManagerService_PostStudentGateAccess_FullMethodName       = "/campusapis.gate.v1.GateManagerService/PostStudentGateAccess"
	GateManagerService_PostRegisterGateEvent_FullMethodName       = "/campusapis.gate.v1.GateManagerService/PostRegisterGateEvent"
)
View Source
const (
	GateCallbackService_PostGateEventCallback_FullMethodName = "/campusapis.gate.v1.GateCallbackService/PostGateEventCallback"
)

Variables

View Source
var (
	Service_name = map[int32]string{
		0: "SERVICE_UNSPECIFIED",
		1: "SERVICE_HIKVISION",
		2: "SERVICE_UNIVIEW",
		3: "SERVICE_BACK_OFFICE",
	}
	Service_value = map[string]int32{
		"SERVICE_UNSPECIFIED": 0,
		"SERVICE_HIKVISION":   1,
		"SERVICE_UNIVIEW":     2,
		"SERVICE_BACK_OFFICE": 3,
	}
)

Enum value maps for Service.

View Source
var (
	Direction_name = map[int32]string{
		0: "DIRECTION_UNSPECIFIED",
		1: "DIRECTION_IN",
		2: "DIRECTION_OUT",
	}
	Direction_value = map[string]int32{
		"DIRECTION_UNSPECIFIED": 0,
		"DIRECTION_IN":          1,
		"DIRECTION_OUT":         2,
	}
)

Enum value maps for Direction.

View Source
var (
	GateType_name = map[int32]string{
		0: "GATE_TYPE_UNSPECIFIED",
		1: "GATE_TYPE_CAMPUS",
		2: "GATE_TYPE_DORMITORY",
		3: "GATE_TYPE_LIBRARY",
	}
	GateType_value = map[string]int32{
		"GATE_TYPE_UNSPECIFIED": 0,
		"GATE_TYPE_CAMPUS":      1,
		"GATE_TYPE_DORMITORY":   2,
		"GATE_TYPE_LIBRARY":     3,
	}
)

Enum value maps for GateType.

View Source
var (
	AccessMethod_name = map[int32]string{
		0: "ACCESS_METHOD_UNSPECIFIED",
		1: "ACCESS_METHOD_SCHOOL_CARD",
		2: "ACCESS_METHOD_FACE",
	}
	AccessMethod_value = map[string]int32{
		"ACCESS_METHOD_UNSPECIFIED": 0,
		"ACCESS_METHOD_SCHOOL_CARD": 1,
		"ACCESS_METHOD_FACE":        2,
	}
)

Enum value maps for AccessMethod.

View Source
var File_campusapis_gate_v1_callback_proto protoreflect.FileDescriptor
View Source
var File_campusapis_gate_v1_defined_proto protoreflect.FileDescriptor
View Source
var File_campusapis_gate_v1_manager_proto protoreflect.FileDescriptor
View Source
var GateCallbackService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "campusapis.gate.v1.GateCallbackService",
	HandlerType: (*GateCallbackServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "PostGateEventCallback",
			Handler:    _GateCallbackService_PostGateEventCallback_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "campusapis/gate/v1/callback.proto",
}

GateCallbackService_ServiceDesc is the grpc.ServiceDesc for GateCallbackService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var GateManagerService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "campusapis.gate.v1.GateManagerService",
	HandlerType: (*GateManagerServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "PostCampusGateEventCallback",
			Handler:    _GateManagerService_PostCampusGateEventCallback_Handler,
		},
		{
			MethodName: "PostStudentGateAccess",
			Handler:    _GateManagerService_PostStudentGateAccess_Handler,
		},
		{
			MethodName: "PostRegisterGateEvent",
			Handler:    _GateManagerService_PostRegisterGateEvent_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "campusapis/gate/v1/manager.proto",
}

GateManagerService_ServiceDesc is the grpc.ServiceDesc for GateManagerService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterGateCallbackServiceHandler

func RegisterGateCallbackServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterGateCallbackServiceHandler registers the http handlers for service GateCallbackService to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterGateCallbackServiceHandlerClient

func RegisterGateCallbackServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client GateCallbackServiceClient) error

RegisterGateCallbackServiceHandlerClient registers the http handlers for service GateCallbackService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "GateCallbackServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "GateCallbackServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "GateCallbackServiceClient" to call the correct interceptors.

func RegisterGateCallbackServiceHandlerFromEndpoint

func RegisterGateCallbackServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterGateCallbackServiceHandlerFromEndpoint is same as RegisterGateCallbackServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterGateCallbackServiceHandlerServer

func RegisterGateCallbackServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server GateCallbackServiceServer) error

RegisterGateCallbackServiceHandlerServer registers the http handlers for service GateCallbackService to "mux". UnaryRPC :call GateCallbackServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterGateCallbackServiceHandlerFromEndpoint instead.

func RegisterGateCallbackServiceServer

func RegisterGateCallbackServiceServer(s grpc.ServiceRegistrar, srv GateCallbackServiceServer)

func RegisterGateManagerServiceHandler

func RegisterGateManagerServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterGateManagerServiceHandler registers the http handlers for service GateManagerService to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterGateManagerServiceHandlerClient

func RegisterGateManagerServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client GateManagerServiceClient) error

RegisterGateManagerServiceHandlerClient registers the http handlers for service GateManagerService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "GateManagerServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "GateManagerServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "GateManagerServiceClient" to call the correct interceptors.

func RegisterGateManagerServiceHandlerFromEndpoint

func RegisterGateManagerServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterGateManagerServiceHandlerFromEndpoint is same as RegisterGateManagerServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterGateManagerServiceHandlerServer

func RegisterGateManagerServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server GateManagerServiceServer) error

RegisterGateManagerServiceHandlerServer registers the http handlers for service GateManagerService to "mux". UnaryRPC :call GateManagerServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterGateManagerServiceHandlerFromEndpoint instead.

func RegisterGateManagerServiceServer

func RegisterGateManagerServiceServer(s grpc.ServiceRegistrar, srv GateManagerServiceServer)

Types

type AccessMethod

type AccessMethod int32

通过方式

const (
	AccessMethod_ACCESS_METHOD_UNSPECIFIED AccessMethod = 0
	// 校园卡
	AccessMethod_ACCESS_METHOD_SCHOOL_CARD AccessMethod = 1
	// 人脸识别
	AccessMethod_ACCESS_METHOD_FACE AccessMethod = 2
)

func (AccessMethod) Descriptor

func (AccessMethod) Enum

func (x AccessMethod) Enum() *AccessMethod

func (AccessMethod) EnumDescriptor deprecated

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

Deprecated: Use AccessMethod.Descriptor instead.

func (AccessMethod) Number

func (AccessMethod) String

func (x AccessMethod) String() string

func (AccessMethod) Type

type Direction

type Direction int32

以门禁限制活动/保护的区域为主体的进出方向

const (
	Direction_DIRECTION_UNSPECIFIED Direction = 0
	// 进
	Direction_DIRECTION_IN Direction = 1
	// 出
	Direction_DIRECTION_OUT Direction = 2
)

func (Direction) Descriptor

func (Direction) Descriptor() protoreflect.EnumDescriptor

func (Direction) Enum

func (x Direction) Enum() *Direction

func (Direction) EnumDescriptor deprecated

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

Deprecated: Use Direction.Descriptor instead.

func (Direction) Number

func (x Direction) Number() protoreflect.EnumNumber

func (Direction) String

func (x Direction) String() string

func (Direction) Type

type GateCallbackServiceClient

type GateCallbackServiceClient interface {
	// 门禁事件回调接口
	PostGateEventCallback(ctx context.Context, in *PostGateEventCallbackRequest, opts ...grpc.CallOption) (*PostGateEventCallbackResponse, error)
}

GateCallbackServiceClient is the client API for GateCallbackService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type GateCallbackServiceServer

type GateCallbackServiceServer interface {
	// 门禁事件回调接口
	PostGateEventCallback(context.Context, *PostGateEventCallbackRequest) (*PostGateEventCallbackResponse, error)
	// contains filtered or unexported methods
}

GateCallbackServiceServer is the server API for GateCallbackService service. All implementations must embed UnimplementedGateCallbackServiceServer for forward compatibility

type GateManagerServiceClient

type GateManagerServiceClient interface {
	// 门禁回调,给第三方服务使用
	PostCampusGateEventCallback(ctx context.Context, in *PostCampusGateEventCallbackRequest, opts ...grpc.CallOption) (*PostCampusGateEventCallbackResponse, error)
	// 推送学生门禁通行信息,仅供内部服务调用
	PostStudentGateAccess(ctx context.Context, in *PostStudentGateAccessRequest, opts ...grpc.CallOption) (*PostStudentGateAccessResponse, error)
	// 注册门禁事件回调至应用,仅供内部服务调用,对应服务需要实现GateCallbackService服务,重复推送视为累加
	PostRegisterGateEvent(ctx context.Context, in *PostRegisterGateEventRequest, opts ...grpc.CallOption) (*PostRegisterGateEventResponse, error)
}

GateManagerServiceClient is the client API for GateManagerService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type GateManagerServiceServer

type GateManagerServiceServer interface {
	// 门禁回调,给第三方服务使用
	PostCampusGateEventCallback(context.Context, *PostCampusGateEventCallbackRequest) (*PostCampusGateEventCallbackResponse, error)
	// 推送学生门禁通行信息,仅供内部服务调用
	PostStudentGateAccess(context.Context, *PostStudentGateAccessRequest) (*PostStudentGateAccessResponse, error)
	// 注册门禁事件回调至应用,仅供内部服务调用,对应服务需要实现GateCallbackService服务,重复推送视为累加
	PostRegisterGateEvent(context.Context, *PostRegisterGateEventRequest) (*PostRegisterGateEventResponse, error)
	// contains filtered or unexported methods
}

GateManagerServiceServer is the server API for GateManagerService service. All implementations must embed UnimplementedGateManagerServiceServer for forward compatibility

type GateType

type GateType int32

门禁类型

const (
	GateType_GATE_TYPE_UNSPECIFIED GateType = 0
	// 学校大门门禁,包括生活区、教学区、研究生公寓门禁
	GateType_GATE_TYPE_CAMPUS GateType = 1
	// 宿舍门禁
	GateType_GATE_TYPE_DORMITORY GateType = 2
	// 图书馆门禁
	GateType_GATE_TYPE_LIBRARY GateType = 3
)

func (GateType) Descriptor

func (GateType) Descriptor() protoreflect.EnumDescriptor

func (GateType) Enum

func (x GateType) Enum() *GateType

func (GateType) EnumDescriptor deprecated

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

Deprecated: Use GateType.Descriptor instead.

func (GateType) Number

func (x GateType) Number() protoreflect.EnumNumber

func (GateType) String

func (x GateType) String() string

func (GateType) Type

type PostCampusGateEventCallbackRequest

type PostCampusGateEventCallbackRequest struct {
	Service string                                   `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"`
	Data    *PostCampusGateEventCallbackRequest_Data `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

门禁回调请求体

func (*PostCampusGateEventCallbackRequest) Descriptor deprecated

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

Deprecated: Use PostCampusGateEventCallbackRequest.ProtoReflect.Descriptor instead.

func (*PostCampusGateEventCallbackRequest) GetData

func (*PostCampusGateEventCallbackRequest) GetService

func (*PostCampusGateEventCallbackRequest) ProtoMessage

func (*PostCampusGateEventCallbackRequest) ProtoMessage()

func (*PostCampusGateEventCallbackRequest) ProtoReflect

func (*PostCampusGateEventCallbackRequest) Reset

func (*PostCampusGateEventCallbackRequest) String

type PostCampusGateEventCallbackRequest_Data

type PostCampusGateEventCallbackRequest_Data struct {
	StaffId   string `protobuf:"bytes,1,opt,name=staff_id,json=staffId,proto3" json:"staff_id,omitempty"`
	StaffName string `protobuf:"bytes,2,opt,name=staff_name,json=staffName,proto3" json:"staff_name,omitempty"`
	DeviceId  string `protobuf:"bytes,3,opt,name=device_id,json=deviceId,proto3" json:"device_id,omitempty"`
	Time      string `protobuf:"bytes,4,opt,name=time,proto3" json:"time,omitempty"`
	Direction string `protobuf:"bytes,5,opt,name=direction,proto3" json:"direction,omitempty"`
	StaffType string `protobuf:"bytes,6,opt,name=staff_type,json=staffType,proto3" json:"staff_type,omitempty"`
	// contains filtered or unexported fields
}

func (*PostCampusGateEventCallbackRequest_Data) Descriptor deprecated

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

Deprecated: Use PostCampusGateEventCallbackRequest_Data.ProtoReflect.Descriptor instead.

func (*PostCampusGateEventCallbackRequest_Data) GetDeviceId

func (*PostCampusGateEventCallbackRequest_Data) GetDirection

func (*PostCampusGateEventCallbackRequest_Data) GetStaffId

func (*PostCampusGateEventCallbackRequest_Data) GetStaffName

func (*PostCampusGateEventCallbackRequest_Data) GetStaffType

func (*PostCampusGateEventCallbackRequest_Data) GetTime

func (*PostCampusGateEventCallbackRequest_Data) ProtoMessage

func (*PostCampusGateEventCallbackRequest_Data) ProtoReflect

func (*PostCampusGateEventCallbackRequest_Data) Reset

func (*PostCampusGateEventCallbackRequest_Data) String

type PostCampusGateEventCallbackResponse

type PostCampusGateEventCallbackResponse struct {
	Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

门禁回调返回体

func (*PostCampusGateEventCallbackResponse) Descriptor deprecated

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

Deprecated: Use PostCampusGateEventCallbackResponse.ProtoReflect.Descriptor instead.

func (*PostCampusGateEventCallbackResponse) GetMessage

func (*PostCampusGateEventCallbackResponse) ProtoMessage

func (*PostCampusGateEventCallbackResponse) ProtoMessage()

func (*PostCampusGateEventCallbackResponse) ProtoReflect

func (*PostCampusGateEventCallbackResponse) Reset

func (*PostCampusGateEventCallbackResponse) String

type PostGateEventCallbackRequest

type PostGateEventCallbackRequest struct {
	StaffId   string `protobuf:"bytes,1,opt,name=staff_id,json=staffId,proto3" json:"staff_id,omitempty"`
	StaffName string `protobuf:"bytes,2,opt,name=staff_name,json=staffName,proto3" json:"staff_name,omitempty"`
	// 事件时间
	Time *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=time,proto3" json:"time,omitempty"`
	// 门禁名称
	GateName  string       `protobuf:"bytes,4,opt,name=gate_name,json=gateName,proto3" json:"gate_name,omitempty"`
	GateType  GateType     `protobuf:"varint,5,opt,name=gate_type,json=gateType,proto3,enum=campusapis.gate.v1.GateType" json:"gate_type,omitempty"`
	Direction Direction    `protobuf:"varint,6,opt,name=direction,proto3,enum=campusapis.gate.v1.Direction" json:"direction,omitempty"`
	Service   Service      `protobuf:"varint,7,opt,name=service,proto3,enum=campusapis.gate.v1.Service" json:"service,omitempty"`
	Method    AccessMethod `protobuf:"varint,8,opt,name=method,proto3,enum=campusapis.gate.v1.AccessMethod" json:"method,omitempty"`
	// contains filtered or unexported fields
}

推送门禁事件回调请求体

func (*PostGateEventCallbackRequest) Descriptor deprecated

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

Deprecated: Use PostGateEventCallbackRequest.ProtoReflect.Descriptor instead.

func (*PostGateEventCallbackRequest) GetDirection

func (x *PostGateEventCallbackRequest) GetDirection() Direction

func (*PostGateEventCallbackRequest) GetGateName

func (x *PostGateEventCallbackRequest) GetGateName() string

func (*PostGateEventCallbackRequest) GetGateType

func (x *PostGateEventCallbackRequest) GetGateType() GateType

func (*PostGateEventCallbackRequest) GetMethod

func (*PostGateEventCallbackRequest) GetService

func (x *PostGateEventCallbackRequest) GetService() Service

func (*PostGateEventCallbackRequest) GetStaffId

func (x *PostGateEventCallbackRequest) GetStaffId() string

func (*PostGateEventCallbackRequest) GetStaffName

func (x *PostGateEventCallbackRequest) GetStaffName() string

func (*PostGateEventCallbackRequest) GetTime

func (*PostGateEventCallbackRequest) ProtoMessage

func (*PostGateEventCallbackRequest) ProtoMessage()

func (*PostGateEventCallbackRequest) ProtoReflect

func (*PostGateEventCallbackRequest) Reset

func (x *PostGateEventCallbackRequest) Reset()

func (*PostGateEventCallbackRequest) String

type PostGateEventCallbackResponse

type PostGateEventCallbackResponse struct {
	Error int32  `protobuf:"varint,1,opt,name=error,proto3" json:"error,omitempty"`
	Msg   string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`
	// contains filtered or unexported fields
}

推送门禁事件回调返回体

func (*PostGateEventCallbackResponse) Descriptor deprecated

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

Deprecated: Use PostGateEventCallbackResponse.ProtoReflect.Descriptor instead.

func (*PostGateEventCallbackResponse) GetError

func (x *PostGateEventCallbackResponse) GetError() int32

func (*PostGateEventCallbackResponse) GetMsg

func (*PostGateEventCallbackResponse) ProtoMessage

func (*PostGateEventCallbackResponse) ProtoMessage()

func (*PostGateEventCallbackResponse) ProtoReflect

func (*PostGateEventCallbackResponse) Reset

func (x *PostGateEventCallbackResponse) Reset()

func (*PostGateEventCallbackResponse) String

type PostRegisterGateEventRequest

type PostRegisterGateEventRequest struct {
	StaffId string `protobuf:"bytes,1,opt,name=staff_id,json=staffId,proto3" json:"staff_id,omitempty"`
	// 触发门禁事件类型
	TriggerGateTypes []GateType `` /* 152-byte string literal not displayed */
	// hook开始时间
	StartTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"`
	// hook结束时间
	EndTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"`
	// 推送事件服务回调grpc端口,接口为ip:port,注意可访问性
	CallbackEndpoint string `protobuf:"bytes,5,opt,name=callback_endpoint,json=callbackEndpoint,proto3" json:"callback_endpoint,omitempty"`
	// contains filtered or unexported fields
}

门禁事件回调注册请求体

func (*PostRegisterGateEventRequest) Descriptor deprecated

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

Deprecated: Use PostRegisterGateEventRequest.ProtoReflect.Descriptor instead.

func (*PostRegisterGateEventRequest) GetCallbackEndpoint

func (x *PostRegisterGateEventRequest) GetCallbackEndpoint() string

func (*PostRegisterGateEventRequest) GetEndTime

func (*PostRegisterGateEventRequest) GetStaffId

func (x *PostRegisterGateEventRequest) GetStaffId() string

func (*PostRegisterGateEventRequest) GetStartTime

func (*PostRegisterGateEventRequest) GetTriggerGateTypes

func (x *PostRegisterGateEventRequest) GetTriggerGateTypes() []GateType

func (*PostRegisterGateEventRequest) ProtoMessage

func (*PostRegisterGateEventRequest) ProtoMessage()

func (*PostRegisterGateEventRequest) ProtoReflect

func (*PostRegisterGateEventRequest) Reset

func (x *PostRegisterGateEventRequest) Reset()

func (*PostRegisterGateEventRequest) String

type PostRegisterGateEventResponse

type PostRegisterGateEventResponse struct {
	// contains filtered or unexported fields
}

门禁事件回调注册返回体

func (*PostRegisterGateEventResponse) Descriptor deprecated

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

Deprecated: Use PostRegisterGateEventResponse.ProtoReflect.Descriptor instead.

func (*PostRegisterGateEventResponse) ProtoMessage

func (*PostRegisterGateEventResponse) ProtoMessage()

func (*PostRegisterGateEventResponse) ProtoReflect

func (*PostRegisterGateEventResponse) Reset

func (x *PostRegisterGateEventResponse) Reset()

func (*PostRegisterGateEventResponse) String

type PostStudentGateAccessRequest

type PostStudentGateAccessRequest struct {

	// 学工号(重要)
	StaffId string `protobuf:"bytes,1,opt,name=staffId,proto3" json:"staffId,omitempty"`
	// 请假类型,数字,一个数字对应一大类请假,枚举及含义:
	// 0->临时请假 | 1->当天假 | 2->单位实习(目前没用)|
	// 3->特殊(目前没用) | 4->身份码(目前没用) |
	// 5->离校 | 6->按周(目前没用) | 7->按月(目前没用)
	DayOffType string `protobuf:"bytes,2,opt,name=dayOffType,proto3" json:"dayOffType,omitempty"`
	// 请假类型,中文名
	DayOffName string `protobuf:"bytes,3,opt,name=dayOffName,proto3" json:"dayOffName,omitempty"`
	// 开始时间(重要)
	TimeStart string `protobuf:"bytes,4,opt,name=timeStart,proto3" json:"timeStart,omitempty"`
	// 结束时间(重要)
	TimeEnd string `protobuf:"bytes,5,opt,name=timeEnd,proto3" json:"timeEnd,omitempty"`
	// 假条 uid
	Uid string `protobuf:"bytes,6,opt,name=uid,proto3" json:"uid,omitempty"`
	// 闸机牌子(重要),枚举及含义:hikvision -> 海康 | uniview -> 宇视
	Target string `protobuf:"bytes,7,opt,name=Target,proto3" json:"Target,omitempty"`
	// contains filtered or unexported fields
}

推送学生门禁通行信息-请求关键字

func (*PostStudentGateAccessRequest) Descriptor deprecated

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

Deprecated: Use PostStudentGateAccessRequest.ProtoReflect.Descriptor instead.

func (*PostStudentGateAccessRequest) GetDayOffName

func (x *PostStudentGateAccessRequest) GetDayOffName() string

func (*PostStudentGateAccessRequest) GetDayOffType

func (x *PostStudentGateAccessRequest) GetDayOffType() string

func (*PostStudentGateAccessRequest) GetStaffId

func (x *PostStudentGateAccessRequest) GetStaffId() string

func (*PostStudentGateAccessRequest) GetTarget

func (x *PostStudentGateAccessRequest) GetTarget() string

func (*PostStudentGateAccessRequest) GetTimeEnd

func (x *PostStudentGateAccessRequest) GetTimeEnd() string

func (*PostStudentGateAccessRequest) GetTimeStart

func (x *PostStudentGateAccessRequest) GetTimeStart() string

func (*PostStudentGateAccessRequest) GetUid

func (*PostStudentGateAccessRequest) ProtoMessage

func (*PostStudentGateAccessRequest) ProtoMessage()

func (*PostStudentGateAccessRequest) ProtoReflect

func (*PostStudentGateAccessRequest) Reset

func (x *PostStudentGateAccessRequest) Reset()

func (*PostStudentGateAccessRequest) String

type PostStudentGateAccessResponse

type PostStudentGateAccessResponse struct {
	Done    bool   `protobuf:"varint,1,opt,name=done,proto3" json:"done,omitempty"`      //是否完成
	Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` //完成信息
	// contains filtered or unexported fields
}

推送学生门禁通行信息

func (*PostStudentGateAccessResponse) Descriptor deprecated

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

Deprecated: Use PostStudentGateAccessResponse.ProtoReflect.Descriptor instead.

func (*PostStudentGateAccessResponse) GetDone

func (x *PostStudentGateAccessResponse) GetDone() bool

func (*PostStudentGateAccessResponse) GetMessage

func (x *PostStudentGateAccessResponse) GetMessage() string

func (*PostStudentGateAccessResponse) ProtoMessage

func (*PostStudentGateAccessResponse) ProtoMessage()

func (*PostStudentGateAccessResponse) ProtoReflect

func (*PostStudentGateAccessResponse) Reset

func (x *PostStudentGateAccessResponse) Reset()

func (*PostStudentGateAccessResponse) String

type Service

type Service int32

门禁服务名称,以品牌或者第三方服务商名称划分,用于出问题时摔锅

const (
	// 未知设备
	Service_SERVICE_UNSPECIFIED Service = 0
	// 海康闸机
	Service_SERVICE_HIKVISION Service = 1
	// 宇视闸机
	Service_SERVICE_UNIVIEW Service = 2
	// 生活区后勤管的闸机,即宿舍闸机
	Service_SERVICE_BACK_OFFICE Service = 3
)

func (Service) Chinese

func (x Service) Chinese() string

func (Service) Descriptor

func (Service) Descriptor() protoreflect.EnumDescriptor

func (Service) Enum

func (x Service) Enum() *Service

func (Service) EnumDescriptor deprecated

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

Deprecated: Use Service.Descriptor instead.

func (Service) Number

func (x Service) Number() protoreflect.EnumNumber

func (Service) String

func (x Service) String() string

func (Service) Type

func (Service) Type() protoreflect.EnumType

type UnimplementedGateCallbackServiceServer

type UnimplementedGateCallbackServiceServer struct {
}

UnimplementedGateCallbackServiceServer must be embedded to have forward compatible implementations.

type UnimplementedGateManagerServiceServer

type UnimplementedGateManagerServiceServer struct {
}

UnimplementedGateManagerServiceServer must be embedded to have forward compatible implementations.

type UnsafeGateCallbackServiceServer

type UnsafeGateCallbackServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeGateCallbackServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to GateCallbackServiceServer will result in compilation errors.

type UnsafeGateManagerServiceServer

type UnsafeGateManagerServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeGateManagerServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to GateManagerServiceServer will result in compilation errors.

Jump to

Keyboard shortcuts

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