arm_authorizer_server

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2024 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ArmAuthorizerServerService_SubscribeArmAuthorization_FullMethodName = "/mavsdk.rpc.arm_authorizer_server.ArmAuthorizerServerService/SubscribeArmAuthorization"
	ArmAuthorizerServerService_AcceptArmAuthorization_FullMethodName    = "/mavsdk.rpc.arm_authorizer_server.ArmAuthorizerServerService/AcceptArmAuthorization"
	ArmAuthorizerServerService_RejectArmAuthorization_FullMethodName    = "/mavsdk.rpc.arm_authorizer_server.ArmAuthorizerServerService/RejectArmAuthorization"
)

Variables

View Source
var (
	RejectionReason_name = map[int32]string{
		0: "REJECTION_REASON_GENERIC",
		1: "REJECTION_REASON_NONE",
		2: "REJECTION_REASON_INVALID_WAYPOINT",
		3: "REJECTION_REASON_TIMEOUT",
		4: "REJECTION_REASON_AIRSPACE_IN_USE",
		5: "REJECTION_REASON_BAD_WEATHER",
	}
	RejectionReason_value = map[string]int32{
		"REJECTION_REASON_GENERIC":          0,
		"REJECTION_REASON_NONE":             1,
		"REJECTION_REASON_INVALID_WAYPOINT": 2,
		"REJECTION_REASON_TIMEOUT":          3,
		"REJECTION_REASON_AIRSPACE_IN_USE":  4,
		"REJECTION_REASON_BAD_WEATHER":      5,
	}
)

Enum value maps for RejectionReason.

View Source
var (
	ArmAuthorizerServerResult_Result_name = map[int32]string{
		0: "RESULT_UNKNOWN",
		1: "RESULT_SUCCESS",
		2: "RESULT_FAILED",
	}
	ArmAuthorizerServerResult_Result_value = map[string]int32{
		"RESULT_UNKNOWN": 0,
		"RESULT_SUCCESS": 1,
		"RESULT_FAILED":  2,
	}
)

Enum value maps for ArmAuthorizerServerResult_Result.

View Source
var ArmAuthorizerServerService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "mavsdk.rpc.arm_authorizer_server.ArmAuthorizerServerService",
	HandlerType: (*ArmAuthorizerServerServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "AcceptArmAuthorization",
			Handler:    _ArmAuthorizerServerService_AcceptArmAuthorization_Handler,
		},
		{
			MethodName: "RejectArmAuthorization",
			Handler:    _ArmAuthorizerServerService_RejectArmAuthorization_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "SubscribeArmAuthorization",
			Handler:       _ArmAuthorizerServerService_SubscribeArmAuthorization_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "arm_authorizer_server.proto",
}

ArmAuthorizerServerService_ServiceDesc is the grpc.ServiceDesc for ArmAuthorizerServerService 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 File_arm_authorizer_server_proto protoreflect.FileDescriptor

Functions

func RegisterArmAuthorizerServerServiceServer

func RegisterArmAuthorizerServerServiceServer(s grpc.ServiceRegistrar, srv ArmAuthorizerServerServiceServer)

Types

type AcceptArmAuthorizationRequest

type AcceptArmAuthorizationRequest struct {
	ValidTimeS int32 `protobuf:"varint,1,opt,name=valid_time_s,json=validTimeS,proto3" json:"valid_time_s,omitempty"` // Time in seconds for which this authorization is valid
	// contains filtered or unexported fields
}

Messages for RespondArmAuthorization

func (*AcceptArmAuthorizationRequest) Descriptor deprecated

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

Deprecated: Use AcceptArmAuthorizationRequest.ProtoReflect.Descriptor instead.

func (*AcceptArmAuthorizationRequest) GetValidTimeS

func (x *AcceptArmAuthorizationRequest) GetValidTimeS() int32

func (*AcceptArmAuthorizationRequest) ProtoMessage

func (*AcceptArmAuthorizationRequest) ProtoMessage()

func (*AcceptArmAuthorizationRequest) ProtoReflect

func (*AcceptArmAuthorizationRequest) Reset

func (x *AcceptArmAuthorizationRequest) Reset()

func (*AcceptArmAuthorizationRequest) String

type AcceptArmAuthorizationResponse

type AcceptArmAuthorizationResponse struct {
	ArmAuthorizerServerResult *ArmAuthorizerServerResult `` // Result enum value
	/* 140-byte string literal not displayed */
	// contains filtered or unexported fields
}

Result type

func (*AcceptArmAuthorizationResponse) Descriptor deprecated

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

Deprecated: Use AcceptArmAuthorizationResponse.ProtoReflect.Descriptor instead.

func (*AcceptArmAuthorizationResponse) GetArmAuthorizerServerResult

func (x *AcceptArmAuthorizationResponse) GetArmAuthorizerServerResult() *ArmAuthorizerServerResult

func (*AcceptArmAuthorizationResponse) ProtoMessage

func (*AcceptArmAuthorizationResponse) ProtoMessage()

func (*AcceptArmAuthorizationResponse) ProtoReflect

func (*AcceptArmAuthorizationResponse) Reset

func (x *AcceptArmAuthorizationResponse) Reset()

func (*AcceptArmAuthorizationResponse) String

type ArmAuthorizationResponse

type ArmAuthorizationResponse struct {
	SystemId uint32 `protobuf:"varint,1,opt,name=system_id,json=systemId,proto3" json:"system_id,omitempty"` // vehicle system id
	// contains filtered or unexported fields
}

func (*ArmAuthorizationResponse) Descriptor deprecated

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

Deprecated: Use ArmAuthorizationResponse.ProtoReflect.Descriptor instead.

func (*ArmAuthorizationResponse) GetSystemId

func (x *ArmAuthorizationResponse) GetSystemId() uint32

func (*ArmAuthorizationResponse) ProtoMessage

func (*ArmAuthorizationResponse) ProtoMessage()

func (*ArmAuthorizationResponse) ProtoReflect

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

func (*ArmAuthorizationResponse) Reset

func (x *ArmAuthorizationResponse) Reset()

func (*ArmAuthorizationResponse) String

func (x *ArmAuthorizationResponse) String() string

type ArmAuthorizerServerResult

type ArmAuthorizerServerResult struct {
	Result ArmAuthorizerServerResult_Result `` // Result enum value
	/* 137-byte string literal not displayed */
	ResultStr string `protobuf:"bytes,2,opt,name=result_str,json=resultStr,proto3" json:"result_str,omitempty"` // Human-readable English string describing the result
	// contains filtered or unexported fields
}

func (*ArmAuthorizerServerResult) Descriptor deprecated

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

Deprecated: Use ArmAuthorizerServerResult.ProtoReflect.Descriptor instead.

func (*ArmAuthorizerServerResult) GetResult

func (*ArmAuthorizerServerResult) GetResultStr

func (x *ArmAuthorizerServerResult) GetResultStr() string

func (*ArmAuthorizerServerResult) ProtoMessage

func (*ArmAuthorizerServerResult) ProtoMessage()

func (*ArmAuthorizerServerResult) ProtoReflect

func (*ArmAuthorizerServerResult) Reset

func (x *ArmAuthorizerServerResult) Reset()

func (*ArmAuthorizerServerResult) String

func (x *ArmAuthorizerServerResult) String() string

type ArmAuthorizerServerResult_Result

type ArmAuthorizerServerResult_Result int32
const (
	ArmAuthorizerServerResult_RESULT_UNKNOWN ArmAuthorizerServerResult_Result = 0 // Unknown result
	ArmAuthorizerServerResult_RESULT_SUCCESS ArmAuthorizerServerResult_Result = 1 // Command accepted
	ArmAuthorizerServerResult_RESULT_FAILED  ArmAuthorizerServerResult_Result = 2 // Command failed
)

func (ArmAuthorizerServerResult_Result) Descriptor

func (ArmAuthorizerServerResult_Result) Enum

func (ArmAuthorizerServerResult_Result) EnumDescriptor deprecated

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

Deprecated: Use ArmAuthorizerServerResult_Result.Descriptor instead.

func (ArmAuthorizerServerResult_Result) Number

func (ArmAuthorizerServerResult_Result) String

func (ArmAuthorizerServerResult_Result) Type

type ArmAuthorizerServerServiceClient

type ArmAuthorizerServerServiceClient interface {
	// Subscribe to arm authorization request messages. Each request received should respond to using RespondArmAuthorization
	SubscribeArmAuthorization(ctx context.Context, in *SubscribeArmAuthorizationRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[ArmAuthorizationResponse], error)
	// Authorize arm for the specific time
	AcceptArmAuthorization(ctx context.Context, in *AcceptArmAuthorizationRequest, opts ...grpc.CallOption) (*AcceptArmAuthorizationResponse, error)
	// Reject arm authorization request
	RejectArmAuthorization(ctx context.Context, in *RejectArmAuthorizationRequest, opts ...grpc.CallOption) (*RejectArmAuthorizationResponse, error)
}

ArmAuthorizerServerServiceClient is the client API for ArmAuthorizerServerService 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 ArmAuthorizerServerServiceServer

type ArmAuthorizerServerServiceServer interface {
	// Subscribe to arm authorization request messages. Each request received should respond to using RespondArmAuthorization
	SubscribeArmAuthorization(*SubscribeArmAuthorizationRequest, grpc.ServerStreamingServer[ArmAuthorizationResponse]) error
	// Authorize arm for the specific time
	AcceptArmAuthorization(context.Context, *AcceptArmAuthorizationRequest) (*AcceptArmAuthorizationResponse, error)
	// Reject arm authorization request
	RejectArmAuthorization(context.Context, *RejectArmAuthorizationRequest) (*RejectArmAuthorizationResponse, error)
	// contains filtered or unexported methods
}

ArmAuthorizerServerServiceServer is the server API for ArmAuthorizerServerService service. All implementations must embed UnimplementedArmAuthorizerServerServiceServer for forward compatibility.

type ArmAuthorizerServerService_SubscribeArmAuthorizationClient

type ArmAuthorizerServerService_SubscribeArmAuthorizationClient = grpc.ServerStreamingClient[ArmAuthorizationResponse]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type ArmAuthorizerServerService_SubscribeArmAuthorizationServer

type ArmAuthorizerServerService_SubscribeArmAuthorizationServer = grpc.ServerStreamingServer[ArmAuthorizationResponse]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type RejectArmAuthorizationRequest

type RejectArmAuthorizationRequest struct {
	Temporarily bool            `protobuf:"varint,1,opt,name=temporarily,proto3" json:"temporarily,omitempty"`                                             // True if the answer should be TEMPORARILY_REJECTED, false for DENIED
	Reason      RejectionReason `protobuf:"varint,2,opt,name=reason,proto3,enum=mavsdk.rpc.arm_authorizer_server.RejectionReason" json:"reason,omitempty"` // Reason for the arm to be rejected
	ExtraInfo   int32           `protobuf:"varint,3,opt,name=extra_info,json=extraInfo,proto3" json:"extra_info,omitempty"`                                // Extra information specific to the rejection reason (see https://mavlink.io/en/services/arm_authorization.html)
	// contains filtered or unexported fields
}

Messages for RespondArmAuthorization

func (*RejectArmAuthorizationRequest) Descriptor deprecated

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

Deprecated: Use RejectArmAuthorizationRequest.ProtoReflect.Descriptor instead.

func (*RejectArmAuthorizationRequest) GetExtraInfo

func (x *RejectArmAuthorizationRequest) GetExtraInfo() int32

func (*RejectArmAuthorizationRequest) GetReason

func (*RejectArmAuthorizationRequest) GetTemporarily

func (x *RejectArmAuthorizationRequest) GetTemporarily() bool

func (*RejectArmAuthorizationRequest) ProtoMessage

func (*RejectArmAuthorizationRequest) ProtoMessage()

func (*RejectArmAuthorizationRequest) ProtoReflect

func (*RejectArmAuthorizationRequest) Reset

func (x *RejectArmAuthorizationRequest) Reset()

func (*RejectArmAuthorizationRequest) String

type RejectArmAuthorizationResponse

type RejectArmAuthorizationResponse struct {
	ArmAuthorizerServerResult *ArmAuthorizerServerResult `` // Result enum value
	/* 140-byte string literal not displayed */
	// contains filtered or unexported fields
}

Result type

func (*RejectArmAuthorizationResponse) Descriptor deprecated

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

Deprecated: Use RejectArmAuthorizationResponse.ProtoReflect.Descriptor instead.

func (*RejectArmAuthorizationResponse) GetArmAuthorizerServerResult

func (x *RejectArmAuthorizationResponse) GetArmAuthorizerServerResult() *ArmAuthorizerServerResult

func (*RejectArmAuthorizationResponse) ProtoMessage

func (*RejectArmAuthorizationResponse) ProtoMessage()

func (*RejectArmAuthorizationResponse) ProtoReflect

func (*RejectArmAuthorizationResponse) Reset

func (x *RejectArmAuthorizationResponse) Reset()

func (*RejectArmAuthorizationResponse) String

type RejectionReason

type RejectionReason int32
const (
	RejectionReason_REJECTION_REASON_GENERIC          RejectionReason = 0 // Not a specific reason
	RejectionReason_REJECTION_REASON_NONE             RejectionReason = 1 // Authorizer will send the error as string to GCS
	RejectionReason_REJECTION_REASON_INVALID_WAYPOINT RejectionReason = 2 // At least one waypoint have a invalid value
	RejectionReason_REJECTION_REASON_TIMEOUT          RejectionReason = 3 // Timeout in the authorizer process(in case it depends on network)
	RejectionReason_REJECTION_REASON_AIRSPACE_IN_USE  RejectionReason = 4 // Airspace of the mission in use by another vehicle, second result parameter can have the waypoint id that caused it to be denied.
	RejectionReason_REJECTION_REASON_BAD_WEATHER      RejectionReason = 5 // Weather is not good to fly
)

func (RejectionReason) Descriptor

func (RejectionReason) Enum

func (x RejectionReason) Enum() *RejectionReason

func (RejectionReason) EnumDescriptor deprecated

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

Deprecated: Use RejectionReason.Descriptor instead.

func (RejectionReason) Number

func (RejectionReason) String

func (x RejectionReason) String() string

func (RejectionReason) Type

type ServiceImpl

type ServiceImpl struct {
	Client ArmAuthorizerServerServiceClient
}

func (*ServiceImpl) AcceptArmAuthorization

func (s *ServiceImpl) AcceptArmAuthorization(ctx context.Context, validTimeS int32) (*AcceptArmAuthorizationResponse, error)

func (*ServiceImpl) ArmAuthorization

func (a *ServiceImpl) ArmAuthorization(ctx context.Context) (<-chan uint32, error)

func (*ServiceImpl) RejectArmAuthorization

func (s *ServiceImpl) RejectArmAuthorization(ctx context.Context, temporarily bool, reason *RejectionReason, extraInfo int32) (*RejectArmAuthorizationResponse, error)

type SubscribeArmAuthorizationRequest

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

Messages for SubscribeArmAuthorization

func (*SubscribeArmAuthorizationRequest) Descriptor deprecated

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

Deprecated: Use SubscribeArmAuthorizationRequest.ProtoReflect.Descriptor instead.

func (*SubscribeArmAuthorizationRequest) ProtoMessage

func (*SubscribeArmAuthorizationRequest) ProtoMessage()

func (*SubscribeArmAuthorizationRequest) ProtoReflect

func (*SubscribeArmAuthorizationRequest) Reset

func (*SubscribeArmAuthorizationRequest) String

type UnimplementedArmAuthorizerServerServiceServer

type UnimplementedArmAuthorizerServerServiceServer struct{}

UnimplementedArmAuthorizerServerServiceServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedArmAuthorizerServerServiceServer) AcceptArmAuthorization

func (UnimplementedArmAuthorizerServerServiceServer) RejectArmAuthorization

type UnsafeArmAuthorizerServerServiceServer

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

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

Jump to

Keyboard shortcuts

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