Documentation
¶
Overview ¶
Package proto 是 AirGate 插件协议的 protobuf 生成代码。
普通插件业务代码应优先使用 sdkgo 包,不应直接依赖本包。
Index ¶
- Constants
- Variables
- func RegisterCoreInvokeServiceServer(s grpc.ServiceRegistrar, srv CoreInvokeServiceServer)
- func RegisterEventServiceServer(s grpc.ServiceRegistrar, srv EventServiceServer)
- func RegisterExtensionServiceServer(s grpc.ServiceRegistrar, srv ExtensionServiceServer)
- func RegisterGatewayServiceServer(s grpc.ServiceRegistrar, srv GatewayServiceServer)
- func RegisterMiddlewareServiceServer(s grpc.ServiceRegistrar, srv MiddlewareServiceServer)
- func RegisterPluginServiceServer(s grpc.ServiceRegistrar, srv PluginServiceServer)
- type AccountProto
- func (*AccountProto) Descriptor() ([]byte, []int)deprecated
- func (x *AccountProto) GetCredentialsJson() []byte
- func (x *AccountProto) GetId() int64
- func (x *AccountProto) GetName() string
- func (x *AccountProto) GetPlatform() string
- func (x *AccountProto) GetProxyUrl() string
- func (x *AccountProto) GetType() string
- func (*AccountProto) ProtoMessage()
- func (x *AccountProto) ProtoReflect() protoreflect.Message
- func (x *AccountProto) Reset()
- func (x *AccountProto) String() string
- type AccountTypeProto
- func (*AccountTypeProto) Descriptor() ([]byte, []int)deprecated
- func (x *AccountTypeProto) GetDescription() string
- func (x *AccountTypeProto) GetFields() []*CredentialFieldProto
- func (x *AccountTypeProto) GetKey() string
- func (x *AccountTypeProto) GetLabel() string
- func (*AccountTypeProto) ProtoMessage()
- func (x *AccountTypeProto) ProtoReflect() protoreflect.Message
- func (x *AccountTypeProto) Reset()
- func (x *AccountTypeProto) String() string
- type BackgroundTaskProto
- func (*BackgroundTaskProto) Descriptor() ([]byte, []int)deprecated
- func (x *BackgroundTaskProto) GetIntervalMs() int64
- func (x *BackgroundTaskProto) GetName() string
- func (*BackgroundTaskProto) ProtoMessage()
- func (x *BackgroundTaskProto) ProtoReflect() protoreflect.Message
- func (x *BackgroundTaskProto) Reset()
- func (x *BackgroundTaskProto) String() string
- type BackgroundTasksResponse
- func (*BackgroundTasksResponse) Descriptor() ([]byte, []int)deprecated
- func (x *BackgroundTasksResponse) GetTasks() []*BackgroundTaskProto
- func (*BackgroundTasksResponse) ProtoMessage()
- func (x *BackgroundTasksResponse) ProtoReflect() protoreflect.Message
- func (x *BackgroundTasksResponse) Reset()
- func (x *BackgroundTasksResponse) String() string
- type ConfigFieldProto
- func (*ConfigFieldProto) Descriptor() ([]byte, []int)deprecated
- func (x *ConfigFieldProto) GetDefaultValue() string
- func (x *ConfigFieldProto) GetDescription() string
- func (x *ConfigFieldProto) GetKey() string
- func (x *ConfigFieldProto) GetLabel() string
- func (x *ConfigFieldProto) GetPlaceholder() string
- func (x *ConfigFieldProto) GetRequired() bool
- func (x *ConfigFieldProto) GetType() string
- func (*ConfigFieldProto) ProtoMessage()
- func (x *ConfigFieldProto) ProtoReflect() protoreflect.Message
- func (x *ConfigFieldProto) Reset()
- func (x *ConfigFieldProto) String() string
- type CoreInvokeServiceClient
- type CoreInvokeServiceServer
- type CoreInvokeService_InvokeStreamClient
- type CoreInvokeService_InvokeStreamServer
- type CredentialFieldProto
- func (*CredentialFieldProto) Descriptor() ([]byte, []int)deprecated
- func (x *CredentialFieldProto) GetEditDisabled() bool
- func (x *CredentialFieldProto) GetKey() string
- func (x *CredentialFieldProto) GetLabel() string
- func (x *CredentialFieldProto) GetPlaceholder() string
- func (x *CredentialFieldProto) GetRequired() bool
- func (x *CredentialFieldProto) GetType() string
- func (*CredentialFieldProto) ProtoMessage()
- func (x *CredentialFieldProto) ProtoReflect() protoreflect.Message
- func (x *CredentialFieldProto) Reset()
- func (x *CredentialFieldProto) String() string
- type CredentialsRequest
- func (*CredentialsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CredentialsRequest) GetCredentials() map[string]string
- func (*CredentialsRequest) ProtoMessage()
- func (x *CredentialsRequest) ProtoReflect() protoreflect.Message
- func (x *CredentialsRequest) Reset()
- func (x *CredentialsRequest) String() string
- type DispatchCandidateProto
- func (*DispatchCandidateProto) Descriptor() ([]byte, []int)deprecated
- func (x *DispatchCandidateProto) GetScheduling() string
- func (x *DispatchCandidateProto) GetWire() string
- func (*DispatchCandidateProto) ProtoMessage()
- func (x *DispatchCandidateProto) ProtoReflect() protoreflect.Message
- func (x *DispatchCandidateProto) Reset()
- func (x *DispatchCandidateProto) String() string
- type DispatchDSLProto
- func (*DispatchDSLProto) Descriptor() ([]byte, []int)deprecated
- func (x *DispatchDSLProto) GetRules() []*DispatchRuleProto
- func (*DispatchDSLProto) ProtoMessage()
- func (x *DispatchDSLProto) ProtoReflect() protoreflect.Message
- func (x *DispatchDSLProto) Reset()
- func (x *DispatchDSLProto) String() string
- type DispatchGateProto
- func (*DispatchGateProto) Descriptor() ([]byte, []int)deprecated
- func (x *DispatchGateProto) GetCode() string
- func (x *DispatchGateProto) GetErrorType() string
- func (x *DispatchGateProto) GetMessage() string
- func (x *DispatchGateProto) GetRequiredOperation() string
- func (x *DispatchGateProto) GetStatus() int32
- func (*DispatchGateProto) ProtoMessage()
- func (x *DispatchGateProto) ProtoReflect() protoreflect.Message
- func (x *DispatchGateProto) Reset()
- func (x *DispatchGateProto) String() string
- type DispatchModelProto
- func (*DispatchModelProto) Descriptor() ([]byte, []int)deprecated
- func (x *DispatchModelProto) GetStripSuffix() string
- func (*DispatchModelProto) ProtoMessage()
- func (x *DispatchModelProto) ProtoReflect() protoreflect.Message
- func (x *DispatchModelProto) Reset()
- func (x *DispatchModelProto) String() string
- type DispatchPlanProto
- func (*DispatchPlanProto) Descriptor() ([]byte, []int)deprecated
- func (x *DispatchPlanProto) GetClientModel() string
- func (x *DispatchPlanProto) GetGate() *DispatchGateProto
- func (x *DispatchPlanProto) GetOperation() string
- func (x *DispatchPlanProto) GetRuleId() string
- func (x *DispatchPlanProto) GetSchedulingModel() string
- func (x *DispatchPlanProto) GetTimeoutProfile() string
- func (x *DispatchPlanProto) GetWireModel() string
- func (*DispatchPlanProto) ProtoMessage()
- func (x *DispatchPlanProto) ProtoReflect() protoreflect.Message
- func (x *DispatchPlanProto) Reset()
- func (x *DispatchPlanProto) String() string
- type DispatchRuleProto
- func (*DispatchRuleProto) Descriptor() ([]byte, []int)deprecated
- func (x *DispatchRuleProto) GetCandidates() []*DispatchCandidateProto
- func (x *DispatchRuleProto) GetGate() *DispatchGateProto
- func (x *DispatchRuleProto) GetId() string
- func (x *DispatchRuleProto) GetModel() *DispatchModelProto
- func (x *DispatchRuleProto) GetOperation() string
- func (x *DispatchRuleProto) GetTimeoutProfile() string
- func (x *DispatchRuleProto) GetWhen() *DispatchWhenProto
- func (*DispatchRuleProto) ProtoMessage()
- func (x *DispatchRuleProto) ProtoReflect() protoreflect.Message
- func (x *DispatchRuleProto) Reset()
- func (x *DispatchRuleProto) String() string
- type DispatchWhenProto
- func (*DispatchWhenProto) Descriptor() ([]byte, []int)deprecated
- func (x *DispatchWhenProto) GetMethods() []string
- func (x *DispatchWhenProto) GetModelPrefixes() []string
- func (x *DispatchWhenProto) GetModelSuffixes() []string
- func (x *DispatchWhenProto) GetModels() []string
- func (x *DispatchWhenProto) GetPathPrefixes() []string
- func (x *DispatchWhenProto) GetPaths() []string
- func (*DispatchWhenProto) ProtoMessage()
- func (x *DispatchWhenProto) ProtoReflect() protoreflect.Message
- func (x *DispatchWhenProto) Reset()
- func (x *DispatchWhenProto) String() string
- type Empty
- type EventHandleResponse
- func (*EventHandleResponse) Descriptor() ([]byte, []int)deprecated
- func (x *EventHandleResponse) GetErrorMessage() string
- func (x *EventHandleResponse) GetSuccess() bool
- func (*EventHandleResponse) ProtoMessage()
- func (x *EventHandleResponse) ProtoReflect() protoreflect.Message
- func (x *EventHandleResponse) Reset()
- func (x *EventHandleResponse) String() string
- type EventSchemaProto
- func (*EventSchemaProto) Descriptor() ([]byte, []int)deprecated
- func (x *EventSchemaProto) GetMetadata() map[string]string
- func (x *EventSchemaProto) GetPayload() *PayloadSchemaProto
- func (x *EventSchemaProto) GetSource() string
- func (x *EventSchemaProto) GetSummary() string
- func (x *EventSchemaProto) GetType() string
- func (*EventSchemaProto) ProtoMessage()
- func (x *EventSchemaProto) ProtoReflect() protoreflect.Message
- func (x *EventSchemaProto) Reset()
- func (x *EventSchemaProto) String() string
- type EventServiceClient
- type EventServiceServer
- type EventSubscriptionProto
- func (*EventSubscriptionProto) Descriptor() ([]byte, []int)deprecated
- func (x *EventSubscriptionProto) GetFilter() map[string]string
- func (x *EventSubscriptionProto) GetMetadata() map[string]string
- func (x *EventSubscriptionProto) GetSource() string
- func (x *EventSubscriptionProto) GetType() string
- func (*EventSubscriptionProto) ProtoMessage()
- func (x *EventSubscriptionProto) ProtoReflect() protoreflect.Message
- func (x *EventSubscriptionProto) Reset()
- func (x *EventSubscriptionProto) String() string
- type EventSubscriptionsResponse
- func (*EventSubscriptionsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *EventSubscriptionsResponse) GetSubscriptions() []*EventSubscriptionProto
- func (*EventSubscriptionsResponse) ProtoMessage()
- func (x *EventSubscriptionsResponse) ProtoReflect() protoreflect.Message
- func (x *EventSubscriptionsResponse) Reset()
- func (x *EventSubscriptionsResponse) String() string
- type ExtensionServiceClient
- type ExtensionServiceServer
- type ExtensionService_HandleStreamRequestClient
- type ExtensionService_HandleStreamRequestServer
- type ForwardChunk
- func (*ForwardChunk) Descriptor() ([]byte, []int)deprecated
- func (x *ForwardChunk) GetData() []byte
- func (x *ForwardChunk) GetDone() bool
- func (x *ForwardChunk) GetFinalOutcome() *ForwardOutcome
- func (x *ForwardChunk) GetHeaders() map[string]*HeaderValues
- func (x *ForwardChunk) GetStatusCode() int32
- func (*ForwardChunk) ProtoMessage()
- func (x *ForwardChunk) ProtoReflect() protoreflect.Message
- func (x *ForwardChunk) Reset()
- func (x *ForwardChunk) String() string
- type ForwardOutcome
- func (*ForwardOutcome) Descriptor() ([]byte, []int)deprecated
- func (x *ForwardOutcome) GetDurationMs() int64
- func (x *ForwardOutcome) GetFailoverScope() string
- func (x *ForwardOutcome) GetKind() OutcomeKind
- func (x *ForwardOutcome) GetReason() string
- func (x *ForwardOutcome) GetRetryAfterMs() int64
- func (x *ForwardOutcome) GetUpdatedCredentials() map[string]string
- func (x *ForwardOutcome) GetUpstream() *UpstreamResponse
- func (x *ForwardOutcome) GetUsage() *Usage
- func (*ForwardOutcome) ProtoMessage()
- func (x *ForwardOutcome) ProtoReflect() protoreflect.Message
- func (x *ForwardOutcome) Reset()
- func (x *ForwardOutcome) String() string
- type ForwardRequest
- func (*ForwardRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ForwardRequest) GetAccount() *AccountProto
- func (x *ForwardRequest) GetBody() []byte
- func (x *ForwardRequest) GetDispatchPlan() *DispatchPlanProto
- func (x *ForwardRequest) GetHeaders() map[string]*HeaderValues
- func (x *ForwardRequest) GetModel() string
- func (x *ForwardRequest) GetStream() bool
- func (*ForwardRequest) ProtoMessage()
- func (x *ForwardRequest) ProtoReflect() protoreflect.Message
- func (x *ForwardRequest) Reset()
- func (x *ForwardRequest) String() string
- type FrontendPageProto
- func (*FrontendPageProto) Descriptor() ([]byte, []int)deprecated
- func (x *FrontendPageProto) GetAudience() string
- func (x *FrontendPageProto) GetDescription() string
- func (x *FrontendPageProto) GetIcon() string
- func (x *FrontendPageProto) GetPath() string
- func (x *FrontendPageProto) GetTitle() string
- func (*FrontendPageProto) ProtoMessage()
- func (x *FrontendPageProto) ProtoReflect() protoreflect.Message
- func (x *FrontendPageProto) Reset()
- func (x *FrontendPageProto) String() string
- type FrontendWidgetProto
- func (*FrontendWidgetProto) Descriptor() ([]byte, []int)deprecated
- func (x *FrontendWidgetProto) GetEntryFile() string
- func (x *FrontendWidgetProto) GetSlot() string
- func (x *FrontendWidgetProto) GetTitle() string
- func (*FrontendWidgetProto) ProtoMessage()
- func (x *FrontendWidgetProto) ProtoReflect() protoreflect.Message
- func (x *FrontendWidgetProto) Reset()
- func (x *FrontendWidgetProto) String() string
- type GatewayServiceClient
- type GatewayServiceServer
- type GatewayService_ForwardStreamClient
- type GatewayService_ForwardStreamServer
- type GatewayService_HandleWebSocketClient
- type GatewayService_HandleWebSocketServer
- type HeaderValues
- type HostInvokeRequest
- func (*HostInvokeRequest) Descriptor() ([]byte, []int)deprecated
- func (x *HostInvokeRequest) GetIdempotencyKey() string
- func (x *HostInvokeRequest) GetMetadata() map[string]string
- func (x *HostInvokeRequest) GetMethod() string
- func (x *HostInvokeRequest) GetPayload() []byte
- func (*HostInvokeRequest) ProtoMessage()
- func (x *HostInvokeRequest) ProtoReflect() protoreflect.Message
- func (x *HostInvokeRequest) Reset()
- func (x *HostInvokeRequest) String() string
- type HostInvokeResponse
- func (*HostInvokeResponse) Descriptor() ([]byte, []int)deprecated
- func (x *HostInvokeResponse) GetMetadata() map[string]string
- func (x *HostInvokeResponse) GetPayload() []byte
- func (x *HostInvokeResponse) GetStatus() string
- func (*HostInvokeResponse) ProtoMessage()
- func (x *HostInvokeResponse) ProtoReflect() protoreflect.Message
- func (x *HostInvokeResponse) Reset()
- func (x *HostInvokeResponse) String() string
- type HostStreamFrame
- func (*HostStreamFrame) Descriptor() ([]byte, []int)deprecated
- func (x *HostStreamFrame) GetDone() bool
- func (x *HostStreamFrame) GetEvent() string
- func (x *HostStreamFrame) GetIdempotencyKey() string
- func (x *HostStreamFrame) GetMetadata() map[string]string
- func (x *HostStreamFrame) GetMethod() string
- func (x *HostStreamFrame) GetPayload() []byte
- func (x *HostStreamFrame) GetStatus() string
- func (*HostStreamFrame) ProtoMessage()
- func (x *HostStreamFrame) ProtoReflect() protoreflect.Message
- func (x *HostStreamFrame) Reset()
- func (x *HostStreamFrame) String() string
- type HttpRequest
- func (*HttpRequest) Descriptor() ([]byte, []int)deprecated
- func (x *HttpRequest) GetBody() []byte
- func (x *HttpRequest) GetHeaders() map[string]*HeaderValues
- func (x *HttpRequest) GetMethod() string
- func (x *HttpRequest) GetPath() string
- func (x *HttpRequest) GetQuery() string
- func (x *HttpRequest) GetRemoteAddr() string
- func (*HttpRequest) ProtoMessage()
- func (x *HttpRequest) ProtoReflect() protoreflect.Message
- func (x *HttpRequest) Reset()
- func (x *HttpRequest) String() string
- type HttpResponse
- func (*HttpResponse) Descriptor() ([]byte, []int)deprecated
- func (x *HttpResponse) GetBody() []byte
- func (x *HttpResponse) GetHeaders() map[string]*HeaderValues
- func (x *HttpResponse) GetStatusCode() int32
- func (*HttpResponse) ProtoMessage()
- func (x *HttpResponse) ProtoReflect() protoreflect.Message
- func (x *HttpResponse) Reset()
- func (x *HttpResponse) String() string
- type HttpResponseChunk
- func (*HttpResponseChunk) Descriptor() ([]byte, []int)deprecated
- func (x *HttpResponseChunk) GetData() []byte
- func (x *HttpResponseChunk) GetDone() bool
- func (x *HttpResponseChunk) GetHeaders() map[string]*HeaderValues
- func (x *HttpResponseChunk) GetStatusCode() int32
- func (*HttpResponseChunk) ProtoMessage()
- func (x *HttpResponseChunk) ProtoReflect() protoreflect.Message
- func (x *HttpResponseChunk) Reset()
- func (x *HttpResponseChunk) String() string
- type InitRequest
- func (*InitRequest) Descriptor() ([]byte, []int)deprecated
- func (x *InitRequest) GetConfig() map[string]string
- func (x *InitRequest) GetCoreInvokeBrokerId() uint32
- func (x *InitRequest) GetLogLevel() string
- func (*InitRequest) ProtoMessage()
- func (x *InitRequest) ProtoReflect() protoreflect.Message
- func (x *InitRequest) Reset()
- func (x *InitRequest) String() string
- type InvokeSchemaProto
- func (*InvokeSchemaProto) Descriptor() ([]byte, []int)deprecated
- func (x *InvokeSchemaProto) GetClientFrame() *PayloadSchemaProto
- func (x *InvokeSchemaProto) GetMetadata() map[string]string
- func (x *InvokeSchemaProto) GetMethod() string
- func (x *InvokeSchemaProto) GetRequest() *PayloadSchemaProto
- func (x *InvokeSchemaProto) GetResponse() *PayloadSchemaProto
- func (x *InvokeSchemaProto) GetServerFrame() *PayloadSchemaProto
- func (x *InvokeSchemaProto) GetSummary() string
- func (x *InvokeSchemaProto) GetTransport() string
- func (*InvokeSchemaProto) ProtoMessage()
- func (x *InvokeSchemaProto) ProtoReflect() protoreflect.Message
- func (x *InvokeSchemaProto) Reset()
- func (x *InvokeSchemaProto) String() string
- type MiddlewareDecision
- func (*MiddlewareDecision) Descriptor() ([]byte, []int)deprecated
- func (x *MiddlewareDecision) GetAction() MiddlewareDecision_Action
- func (x *MiddlewareDecision) GetDenyMessage() string
- func (x *MiddlewareDecision) GetDenyStatusCode() int32
- func (x *MiddlewareDecision) GetMetadata() map[string]string
- func (x *MiddlewareDecision) GetSetHeaders() map[string]*HeaderValues
- func (*MiddlewareDecision) ProtoMessage()
- func (x *MiddlewareDecision) ProtoReflect() protoreflect.Message
- func (x *MiddlewareDecision) Reset()
- func (x *MiddlewareDecision) String() string
- type MiddlewareDecision_Action
- func (MiddlewareDecision_Action) Descriptor() protoreflect.EnumDescriptor
- func (x MiddlewareDecision_Action) Enum() *MiddlewareDecision_Action
- func (MiddlewareDecision_Action) EnumDescriptor() ([]byte, []int)deprecated
- func (x MiddlewareDecision_Action) Number() protoreflect.EnumNumber
- func (x MiddlewareDecision_Action) String() string
- func (MiddlewareDecision_Action) Type() protoreflect.EnumType
- type MiddlewareEvent
- func (*MiddlewareEvent) Descriptor() ([]byte, []int)deprecated
- func (x *MiddlewareEvent) GetAccountId() int64
- func (x *MiddlewareEvent) GetDurationMs() int64
- func (x *MiddlewareEvent) GetErrorKind() string
- func (x *MiddlewareEvent) GetErrorMsg() string
- func (x *MiddlewareEvent) GetGroupId() int64
- func (x *MiddlewareEvent) GetMetadata() map[string]string
- func (x *MiddlewareEvent) GetModel() string
- func (x *MiddlewareEvent) GetPlatform() string
- func (x *MiddlewareEvent) GetRequestId() string
- func (x *MiddlewareEvent) GetResponseBody() []byte
- func (x *MiddlewareEvent) GetResponseHeaders() map[string]*HeaderValues
- func (x *MiddlewareEvent) GetStatusCode() int64
- func (x *MiddlewareEvent) GetStream() bool
- func (x *MiddlewareEvent) GetUsage() *Usage
- func (x *MiddlewareEvent) GetUserId() int64
- func (*MiddlewareEvent) ProtoMessage()
- func (x *MiddlewareEvent) ProtoReflect() protoreflect.Message
- func (x *MiddlewareEvent) Reset()
- func (x *MiddlewareEvent) String() string
- type MiddlewareRequest
- func (*MiddlewareRequest) Descriptor() ([]byte, []int)deprecated
- func (x *MiddlewareRequest) GetAccountId() int64
- func (x *MiddlewareRequest) GetGroupId() int64
- func (x *MiddlewareRequest) GetMetadata() map[string]string
- func (x *MiddlewareRequest) GetModel() string
- func (x *MiddlewareRequest) GetPlatform() string
- func (x *MiddlewareRequest) GetRequestBody() []byte
- func (x *MiddlewareRequest) GetRequestHeaders() map[string]*HeaderValues
- func (x *MiddlewareRequest) GetRequestId() string
- func (x *MiddlewareRequest) GetStream() bool
- func (x *MiddlewareRequest) GetUserId() int64
- func (*MiddlewareRequest) ProtoMessage()
- func (x *MiddlewareRequest) ProtoReflect() protoreflect.Message
- func (x *MiddlewareRequest) Reset()
- func (x *MiddlewareRequest) String() string
- type MiddlewareServiceClient
- type MiddlewareServiceServer
- type ModelInfoProto
- func (*ModelInfoProto) Descriptor() ([]byte, []int)deprecated
- func (x *ModelInfoProto) GetCapabilities() []string
- func (x *ModelInfoProto) GetContextWindow() int64
- func (x *ModelInfoProto) GetId() string
- func (x *ModelInfoProto) GetMaxOutputTokens() int64
- func (x *ModelInfoProto) GetMetadata() map[string]string
- func (x *ModelInfoProto) GetName() string
- func (*ModelInfoProto) ProtoMessage()
- func (x *ModelInfoProto) ProtoReflect() protoreflect.Message
- func (x *ModelInfoProto) Reset()
- func (x *ModelInfoProto) String() string
- type ModelsResponse
- type OutcomeKind
- func (OutcomeKind) Descriptor() protoreflect.EnumDescriptor
- func (x OutcomeKind) Enum() *OutcomeKind
- func (OutcomeKind) EnumDescriptor() ([]byte, []int)deprecated
- func (x OutcomeKind) Number() protoreflect.EnumNumber
- func (x OutcomeKind) String() string
- func (OutcomeKind) Type() protoreflect.EnumType
- type PayloadSchemaProto
- func (*PayloadSchemaProto) Descriptor() ([]byte, []int)deprecated
- func (x *PayloadSchemaProto) GetContentType() string
- func (x *PayloadSchemaProto) GetExample() string
- func (x *PayloadSchemaProto) GetMetadata() map[string]string
- func (x *PayloadSchemaProto) GetSchema() string
- func (*PayloadSchemaProto) ProtoMessage()
- func (x *PayloadSchemaProto) ProtoReflect() protoreflect.Message
- func (x *PayloadSchemaProto) Reset()
- func (x *PayloadSchemaProto) String() string
- type PluginEvent
- func (*PluginEvent) Descriptor() ([]byte, []int)deprecated
- func (x *PluginEvent) GetGroupId() int64
- func (x *PluginEvent) GetId() string
- func (x *PluginEvent) GetMetadata() map[string]string
- func (x *PluginEvent) GetOccurredAt() int64
- func (x *PluginEvent) GetPayload() []byte
- func (x *PluginEvent) GetSource() string
- func (x *PluginEvent) GetSubject() string
- func (x *PluginEvent) GetType() string
- func (x *PluginEvent) GetUserId() int64
- func (*PluginEvent) ProtoMessage()
- func (x *PluginEvent) ProtoReflect() protoreflect.Message
- func (x *PluginEvent) Reset()
- func (x *PluginEvent) String() string
- type PluginInfoResponse
- func (*PluginInfoResponse) Descriptor() ([]byte, []int)deprecated
- func (x *PluginInfoResponse) GetAccountTypes() []*AccountTypeProto
- func (x *PluginInfoResponse) GetAuthor() string
- func (x *PluginInfoResponse) GetCapabilities() []string
- func (x *PluginInfoResponse) GetConfigSchema() []*ConfigFieldProto
- func (x *PluginInfoResponse) GetDependencies() []string
- func (x *PluginInfoResponse) GetDescription() string
- func (x *PluginInfoResponse) GetDispatchDsl() *DispatchDSLProto
- func (x *PluginInfoResponse) GetFrontendPages() []*FrontendPageProto
- func (x *PluginInfoResponse) GetFrontendWidgets() []*FrontendWidgetProto
- func (x *PluginInfoResponse) GetId() string
- func (x *PluginInfoResponse) GetInstructionPresets() []string
- func (x *PluginInfoResponse) GetMetadata() map[string]string
- func (x *PluginInfoResponse) GetName() string
- func (x *PluginInfoResponse) GetPriority() int32
- func (x *PluginInfoResponse) GetSdkVersion() string
- func (x *PluginInfoResponse) GetType() string
- func (x *PluginInfoResponse) GetVersion() string
- func (*PluginInfoResponse) ProtoMessage()
- func (x *PluginInfoResponse) ProtoReflect() protoreflect.Message
- func (x *PluginInfoResponse) Reset()
- func (x *PluginInfoResponse) String() string
- type PluginSchemaResponse
- func (*PluginSchemaResponse) Descriptor() ([]byte, []int)deprecated
- func (x *PluginSchemaResponse) GetEvents() []*EventSchemaProto
- func (x *PluginSchemaResponse) GetInvokes() []*InvokeSchemaProto
- func (x *PluginSchemaResponse) GetMetadata() map[string]string
- func (x *PluginSchemaResponse) GetRoutes() []*RouteSchemaProto
- func (x *PluginSchemaResponse) GetTasks() []*TaskSchemaProto
- func (*PluginSchemaResponse) ProtoMessage()
- func (x *PluginSchemaResponse) ProtoReflect() protoreflect.Message
- func (x *PluginSchemaResponse) Reset()
- func (x *PluginSchemaResponse) String() string
- type PluginServiceClient
- type PluginServiceServer
- type ProcessTaskRequest
- func (*ProcessTaskRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ProcessTaskRequest) GetInput() []byte
- func (x *ProcessTaskRequest) GetTaskId() int64
- func (x *ProcessTaskRequest) GetTaskType() string
- func (x *ProcessTaskRequest) GetUserId() int64
- func (*ProcessTaskRequest) ProtoMessage()
- func (x *ProcessTaskRequest) ProtoReflect() protoreflect.Message
- func (x *ProcessTaskRequest) Reset()
- func (x *ProcessTaskRequest) String() string
- type ProcessTaskResponse
- func (*ProcessTaskResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ProcessTaskResponse) GetErrorMessage() string
- func (x *ProcessTaskResponse) GetSuccess() bool
- func (*ProcessTaskResponse) ProtoMessage()
- func (x *ProcessTaskResponse) ProtoReflect() protoreflect.Message
- func (x *ProcessTaskResponse) Reset()
- func (x *ProcessTaskResponse) String() string
- type RouteDefinitionProto
- func (*RouteDefinitionProto) Descriptor() ([]byte, []int)deprecated
- func (x *RouteDefinitionProto) GetDescription() string
- func (x *RouteDefinitionProto) GetMetadata() map[string]string
- func (x *RouteDefinitionProto) GetMethod() string
- func (x *RouteDefinitionProto) GetPath() string
- func (*RouteDefinitionProto) ProtoMessage()
- func (x *RouteDefinitionProto) ProtoReflect() protoreflect.Message
- func (x *RouteDefinitionProto) Reset()
- func (x *RouteDefinitionProto) String() string
- type RouteSchemaProto
- func (*RouteSchemaProto) Descriptor() ([]byte, []int)deprecated
- func (x *RouteSchemaProto) GetMetadata() map[string]string
- func (x *RouteSchemaProto) GetMethod() string
- func (x *RouteSchemaProto) GetPath() string
- func (x *RouteSchemaProto) GetRequest() *PayloadSchemaProto
- func (x *RouteSchemaProto) GetResponse() *PayloadSchemaProto
- func (x *RouteSchemaProto) GetSummary() string
- func (*RouteSchemaProto) ProtoMessage()
- func (x *RouteSchemaProto) ProtoReflect() protoreflect.Message
- func (x *RouteSchemaProto) Reset()
- func (x *RouteSchemaProto) String() string
- type RoutesResponse
- type RunBackgroundTaskRequest
- func (*RunBackgroundTaskRequest) Descriptor() ([]byte, []int)deprecated
- func (x *RunBackgroundTaskRequest) GetName() string
- func (*RunBackgroundTaskRequest) ProtoMessage()
- func (x *RunBackgroundTaskRequest) ProtoReflect() protoreflect.Message
- func (x *RunBackgroundTaskRequest) Reset()
- func (x *RunBackgroundTaskRequest) String() string
- type StringResponse
- type TaskSchemaProto
- func (*TaskSchemaProto) Descriptor() ([]byte, []int)deprecated
- func (x *TaskSchemaProto) GetInput() *PayloadSchemaProto
- func (x *TaskSchemaProto) GetMetadata() map[string]string
- func (x *TaskSchemaProto) GetOutput() *PayloadSchemaProto
- func (x *TaskSchemaProto) GetSummary() string
- func (x *TaskSchemaProto) GetType() string
- func (*TaskSchemaProto) ProtoMessage()
- func (x *TaskSchemaProto) ProtoReflect() protoreflect.Message
- func (x *TaskSchemaProto) Reset()
- func (x *TaskSchemaProto) String() string
- type TaskTypesResponse
- type UnimplementedCoreInvokeServiceServer
- type UnimplementedEventServiceServer
- type UnimplementedExtensionServiceServer
- func (UnimplementedExtensionServiceServer) GetBackgroundTasks(context.Context, *Empty) (*BackgroundTasksResponse, error)
- func (UnimplementedExtensionServiceServer) GetTaskTypes(context.Context, *Empty) (*TaskTypesResponse, error)
- func (UnimplementedExtensionServiceServer) HandleRequest(context.Context, *HttpRequest) (*HttpResponse, error)
- func (UnimplementedExtensionServiceServer) HandleStreamRequest(*HttpRequest, grpc.ServerStreamingServer[HttpResponseChunk]) error
- func (UnimplementedExtensionServiceServer) Migrate(context.Context, *Empty) (*Empty, error)
- func (UnimplementedExtensionServiceServer) ProcessTask(context.Context, *ProcessTaskRequest) (*ProcessTaskResponse, error)
- func (UnimplementedExtensionServiceServer) RunBackgroundTask(context.Context, *RunBackgroundTaskRequest) (*Empty, error)
- type UnimplementedGatewayServiceServer
- func (UnimplementedGatewayServiceServer) Forward(context.Context, *ForwardRequest) (*ForwardOutcome, error)
- func (UnimplementedGatewayServiceServer) ForwardStream(*ForwardRequest, grpc.ServerStreamingServer[ForwardChunk]) error
- func (UnimplementedGatewayServiceServer) GetModels(context.Context, *Empty) (*ModelsResponse, error)
- func (UnimplementedGatewayServiceServer) GetPlatform(context.Context, *Empty) (*StringResponse, error)
- func (UnimplementedGatewayServiceServer) GetRoutes(context.Context, *Empty) (*RoutesResponse, error)
- func (UnimplementedGatewayServiceServer) HandleWebSocket(grpc.BidiStreamingServer[WebSocketFrame, WebSocketFrame]) error
- func (UnimplementedGatewayServiceServer) ValidateAccount(context.Context, *CredentialsRequest) (*Empty, error)
- type UnimplementedMiddlewareServiceServer
- type UnimplementedPluginServiceServer
- func (UnimplementedPluginServiceServer) GetInfo(context.Context, *Empty) (*PluginInfoResponse, error)
- func (UnimplementedPluginServiceServer) GetSchema(context.Context, *Empty) (*PluginSchemaResponse, error)
- func (UnimplementedPluginServiceServer) GetWebAssets(context.Context, *Empty) (*WebAssetsResponse, error)
- func (UnimplementedPluginServiceServer) HandleRequest(context.Context, *HttpRequest) (*HttpResponse, error)
- func (UnimplementedPluginServiceServer) HealthCheck(context.Context, *Empty) (*Empty, error)
- func (UnimplementedPluginServiceServer) Init(context.Context, *InitRequest) (*Empty, error)
- func (UnimplementedPluginServiceServer) Start(context.Context, *Empty) (*Empty, error)
- func (UnimplementedPluginServiceServer) Stop(context.Context, *Empty) (*Empty, error)
- type UnsafeCoreInvokeServiceServer
- type UnsafeEventServiceServer
- type UnsafeExtensionServiceServer
- type UnsafeGatewayServiceServer
- type UnsafeMiddlewareServiceServer
- type UnsafePluginServiceServer
- type UpstreamResponse
- func (*UpstreamResponse) Descriptor() ([]byte, []int)deprecated
- func (x *UpstreamResponse) GetBody() []byte
- func (x *UpstreamResponse) GetHeaders() map[string]*HeaderValues
- func (x *UpstreamResponse) GetStatusCode() int32
- func (*UpstreamResponse) ProtoMessage()
- func (x *UpstreamResponse) ProtoReflect() protoreflect.Message
- func (x *UpstreamResponse) Reset()
- func (x *UpstreamResponse) String() string
- type Usage
- func (*Usage) Descriptor() ([]byte, []int)deprecated
- func (x *Usage) GetAccountCost() float64
- func (x *Usage) GetBillingMultiplier() float64
- func (x *Usage) GetCacheCreationCost() float64
- func (x *Usage) GetCacheCreationPrice() float64
- func (x *Usage) GetCacheCreationTokens() int64
- func (x *Usage) GetCachedInputCost() float64
- func (x *Usage) GetCachedInputPrice() float64
- func (x *Usage) GetCachedInputTokens() int64
- func (x *Usage) GetCurrency() string
- func (x *Usage) GetFirstTokenMs() int64
- func (x *Usage) GetInputCost() float64
- func (x *Usage) GetInputPrice() float64
- func (x *Usage) GetInputTokens() int64
- func (x *Usage) GetMetadata() map[string]string
- func (x *Usage) GetModel() string
- func (x *Usage) GetOutputCost() float64
- func (x *Usage) GetOutputPrice() float64
- func (x *Usage) GetOutputTokens() int64
- func (x *Usage) GetReasoningEffort() string
- func (x *Usage) GetReasoningOutputTokens() int64
- func (x *Usage) GetSummary() string
- func (x *Usage) GetUserCost() float64
- func (*Usage) ProtoMessage()
- func (x *Usage) ProtoReflect() protoreflect.Message
- func (x *Usage) Reset()
- func (x *Usage) String() string
- type WebAssetFile
- func (*WebAssetFile) Descriptor() ([]byte, []int)deprecated
- func (x *WebAssetFile) GetContent() []byte
- func (x *WebAssetFile) GetPath() string
- func (*WebAssetFile) ProtoMessage()
- func (x *WebAssetFile) ProtoReflect() protoreflect.Message
- func (x *WebAssetFile) Reset()
- func (x *WebAssetFile) String() string
- type WebAssetsResponse
- func (*WebAssetsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *WebAssetsResponse) GetFiles() []*WebAssetFile
- func (x *WebAssetsResponse) GetHasAssets() bool
- func (*WebAssetsResponse) ProtoMessage()
- func (x *WebAssetsResponse) ProtoReflect() protoreflect.Message
- func (x *WebAssetsResponse) Reset()
- func (x *WebAssetsResponse) String() string
- type WebSocketConnectInfo
- func (*WebSocketConnectInfo) Descriptor() ([]byte, []int)deprecated
- func (x *WebSocketConnectInfo) GetAccount() *AccountProto
- func (x *WebSocketConnectInfo) GetConnectionId() string
- func (x *WebSocketConnectInfo) GetHeaders() map[string]*HeaderValues
- func (x *WebSocketConnectInfo) GetPath() string
- func (x *WebSocketConnectInfo) GetQuery() string
- func (x *WebSocketConnectInfo) GetRemoteAddr() string
- func (*WebSocketConnectInfo) ProtoMessage()
- func (x *WebSocketConnectInfo) ProtoReflect() protoreflect.Message
- func (x *WebSocketConnectInfo) Reset()
- func (x *WebSocketConnectInfo) String() string
- type WebSocketFrame
- func (*WebSocketFrame) Descriptor() ([]byte, []int)deprecated
- func (x *WebSocketFrame) GetCloseCode() int32
- func (x *WebSocketFrame) GetCloseReason() string
- func (x *WebSocketFrame) GetConnectInfo() *WebSocketConnectInfo
- func (x *WebSocketFrame) GetData() []byte
- func (x *WebSocketFrame) GetOutcome() *ForwardOutcome
- func (x *WebSocketFrame) GetType() WebSocketFrame_FrameType
- func (*WebSocketFrame) ProtoMessage()
- func (x *WebSocketFrame) ProtoReflect() protoreflect.Message
- func (x *WebSocketFrame) Reset()
- func (x *WebSocketFrame) String() string
- type WebSocketFrame_FrameType
- func (WebSocketFrame_FrameType) Descriptor() protoreflect.EnumDescriptor
- func (x WebSocketFrame_FrameType) Enum() *WebSocketFrame_FrameType
- func (WebSocketFrame_FrameType) EnumDescriptor() ([]byte, []int)deprecated
- func (x WebSocketFrame_FrameType) Number() protoreflect.EnumNumber
- func (x WebSocketFrame_FrameType) String() string
- func (WebSocketFrame_FrameType) Type() protoreflect.EnumType
Constants ¶
const ( PluginService_GetInfo_FullMethodName = "/airgate.plugin.v1.PluginService/GetInfo" PluginService_Init_FullMethodName = "/airgate.plugin.v1.PluginService/Init" PluginService_Start_FullMethodName = "/airgate.plugin.v1.PluginService/Start" PluginService_Stop_FullMethodName = "/airgate.plugin.v1.PluginService/Stop" PluginService_GetWebAssets_FullMethodName = "/airgate.plugin.v1.PluginService/GetWebAssets" PluginService_GetSchema_FullMethodName = "/airgate.plugin.v1.PluginService/GetSchema" PluginService_HealthCheck_FullMethodName = "/airgate.plugin.v1.PluginService/HealthCheck" PluginService_HandleRequest_FullMethodName = "/airgate.plugin.v1.PluginService/HandleRequest" )
const ( GatewayService_GetPlatform_FullMethodName = "/airgate.plugin.v1.GatewayService/GetPlatform" GatewayService_GetModels_FullMethodName = "/airgate.plugin.v1.GatewayService/GetModels" GatewayService_GetRoutes_FullMethodName = "/airgate.plugin.v1.GatewayService/GetRoutes" GatewayService_Forward_FullMethodName = "/airgate.plugin.v1.GatewayService/Forward" GatewayService_ForwardStream_FullMethodName = "/airgate.plugin.v1.GatewayService/ForwardStream" GatewayService_ValidateAccount_FullMethodName = "/airgate.plugin.v1.GatewayService/ValidateAccount" GatewayService_HandleWebSocket_FullMethodName = "/airgate.plugin.v1.GatewayService/HandleWebSocket" )
const ( ExtensionService_Migrate_FullMethodName = "/airgate.plugin.v1.ExtensionService/Migrate" ExtensionService_GetBackgroundTasks_FullMethodName = "/airgate.plugin.v1.ExtensionService/GetBackgroundTasks" ExtensionService_RunBackgroundTask_FullMethodName = "/airgate.plugin.v1.ExtensionService/RunBackgroundTask" ExtensionService_HandleRequest_FullMethodName = "/airgate.plugin.v1.ExtensionService/HandleRequest" ExtensionService_HandleStreamRequest_FullMethodName = "/airgate.plugin.v1.ExtensionService/HandleStreamRequest" ExtensionService_ProcessTask_FullMethodName = "/airgate.plugin.v1.ExtensionService/ProcessTask" ExtensionService_GetTaskTypes_FullMethodName = "/airgate.plugin.v1.ExtensionService/GetTaskTypes" )
const ( MiddlewareService_OnForwardBegin_FullMethodName = "/airgate.plugin.v1.MiddlewareService/OnForwardBegin" MiddlewareService_OnForwardEnd_FullMethodName = "/airgate.plugin.v1.MiddlewareService/OnForwardEnd" )
const ( EventService_GetEventSubscriptions_FullMethodName = "/airgate.plugin.v1.EventService/GetEventSubscriptions" EventService_HandleEvent_FullMethodName = "/airgate.plugin.v1.EventService/HandleEvent" )
const ( CoreInvokeService_Invoke_FullMethodName = "/airgate.plugin.v1.CoreInvokeService/Invoke" CoreInvokeService_InvokeStream_FullMethodName = "/airgate.plugin.v1.CoreInvokeService/InvokeStream" )
Variables ¶
var ( OutcomeKind_name = map[int32]string{ 0: "OUTCOME_UNKNOWN", 1: "OUTCOME_SUCCESS", 2: "OUTCOME_CLIENT_ERROR", 3: "OUTCOME_ACCOUNT_RATE_LIMITED", 4: "OUTCOME_ACCOUNT_DEAD", 5: "OUTCOME_UPSTREAM_TRANSIENT", 6: "OUTCOME_STREAM_ABORTED", 7: "OUTCOME_ACCOUNT_MODEL_UNSUPPORTED", 8: "OUTCOME_ACCOUNT_UNAVAILABLE", } OutcomeKind_value = map[string]int32{ "OUTCOME_UNKNOWN": 0, "OUTCOME_SUCCESS": 1, "OUTCOME_CLIENT_ERROR": 2, "OUTCOME_ACCOUNT_RATE_LIMITED": 3, "OUTCOME_ACCOUNT_DEAD": 4, "OUTCOME_UPSTREAM_TRANSIENT": 5, "OUTCOME_STREAM_ABORTED": 6, "OUTCOME_ACCOUNT_MODEL_UNSUPPORTED": 7, "OUTCOME_ACCOUNT_UNAVAILABLE": 8, } )
Enum value maps for OutcomeKind.
var ( WebSocketFrame_FrameType_name = map[int32]string{ 0: "CONNECT", 1: "TEXT", 2: "BINARY", 3: "CLOSE", 4: "RESULT", } WebSocketFrame_FrameType_value = map[string]int32{ "CONNECT": 0, "TEXT": 1, "BINARY": 2, "CLOSE": 3, "RESULT": 4, } )
Enum value maps for WebSocketFrame_FrameType.
var ( MiddlewareDecision_Action_name = map[int32]string{ 0: "ALLOW", 1: "DENY", 2: "MUTATE", } MiddlewareDecision_Action_value = map[string]int32{ "ALLOW": 0, "DENY": 1, "MUTATE": 2, } )
Enum value maps for MiddlewareDecision_Action.
var CoreInvokeService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "airgate.plugin.v1.CoreInvokeService", HandlerType: (*CoreInvokeServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Invoke", Handler: _CoreInvokeService_Invoke_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "InvokeStream", Handler: _CoreInvokeService_InvokeStream_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "plugin.proto", }
CoreInvokeService_ServiceDesc is the grpc.ServiceDesc for CoreInvokeService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var EventService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "airgate.plugin.v1.EventService", HandlerType: (*EventServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetEventSubscriptions", Handler: _EventService_GetEventSubscriptions_Handler, }, { MethodName: "HandleEvent", Handler: _EventService_HandleEvent_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "plugin.proto", }
EventService_ServiceDesc is the grpc.ServiceDesc for EventService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var ExtensionService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "airgate.plugin.v1.ExtensionService", HandlerType: (*ExtensionServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Migrate", Handler: _ExtensionService_Migrate_Handler, }, { MethodName: "GetBackgroundTasks", Handler: _ExtensionService_GetBackgroundTasks_Handler, }, { MethodName: "RunBackgroundTask", Handler: _ExtensionService_RunBackgroundTask_Handler, }, { MethodName: "HandleRequest", Handler: _ExtensionService_HandleRequest_Handler, }, { MethodName: "ProcessTask", Handler: _ExtensionService_ProcessTask_Handler, }, { MethodName: "GetTaskTypes", Handler: _ExtensionService_GetTaskTypes_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "HandleStreamRequest", Handler: _ExtensionService_HandleStreamRequest_Handler, ServerStreams: true, }, }, Metadata: "plugin.proto", }
ExtensionService_ServiceDesc is the grpc.ServiceDesc for ExtensionService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_plugin_proto protoreflect.FileDescriptor
var GatewayService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "airgate.plugin.v1.GatewayService", HandlerType: (*GatewayServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetPlatform", Handler: _GatewayService_GetPlatform_Handler, }, { MethodName: "GetModels", Handler: _GatewayService_GetModels_Handler, }, { MethodName: "GetRoutes", Handler: _GatewayService_GetRoutes_Handler, }, { MethodName: "Forward", Handler: _GatewayService_Forward_Handler, }, { MethodName: "ValidateAccount", Handler: _GatewayService_ValidateAccount_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "ForwardStream", Handler: _GatewayService_ForwardStream_Handler, ServerStreams: true, }, { StreamName: "HandleWebSocket", Handler: _GatewayService_HandleWebSocket_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "plugin.proto", }
GatewayService_ServiceDesc is the grpc.ServiceDesc for GatewayService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var MiddlewareService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "airgate.plugin.v1.MiddlewareService", HandlerType: (*MiddlewareServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "OnForwardBegin", Handler: _MiddlewareService_OnForwardBegin_Handler, }, { MethodName: "OnForwardEnd", Handler: _MiddlewareService_OnForwardEnd_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "plugin.proto", }
MiddlewareService_ServiceDesc is the grpc.ServiceDesc for MiddlewareService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var PluginService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "airgate.plugin.v1.PluginService", HandlerType: (*PluginServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetInfo", Handler: _PluginService_GetInfo_Handler, }, { MethodName: "Init", Handler: _PluginService_Init_Handler, }, { MethodName: "Start", Handler: _PluginService_Start_Handler, }, { MethodName: "Stop", Handler: _PluginService_Stop_Handler, }, { MethodName: "GetWebAssets", Handler: _PluginService_GetWebAssets_Handler, }, { MethodName: "GetSchema", Handler: _PluginService_GetSchema_Handler, }, { MethodName: "HealthCheck", Handler: _PluginService_HealthCheck_Handler, }, { MethodName: "HandleRequest", Handler: _PluginService_HandleRequest_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "plugin.proto", }
PluginService_ServiceDesc is the grpc.ServiceDesc for PluginService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterCoreInvokeServiceServer ¶
func RegisterCoreInvokeServiceServer(s grpc.ServiceRegistrar, srv CoreInvokeServiceServer)
func RegisterEventServiceServer ¶
func RegisterEventServiceServer(s grpc.ServiceRegistrar, srv EventServiceServer)
func RegisterExtensionServiceServer ¶
func RegisterExtensionServiceServer(s grpc.ServiceRegistrar, srv ExtensionServiceServer)
func RegisterGatewayServiceServer ¶
func RegisterGatewayServiceServer(s grpc.ServiceRegistrar, srv GatewayServiceServer)
func RegisterMiddlewareServiceServer ¶
func RegisterMiddlewareServiceServer(s grpc.ServiceRegistrar, srv MiddlewareServiceServer)
func RegisterPluginServiceServer ¶
func RegisterPluginServiceServer(s grpc.ServiceRegistrar, srv PluginServiceServer)
Types ¶
type AccountProto ¶
type AccountProto struct {
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
Platform string `protobuf:"bytes,3,opt,name=platform,proto3" json:"platform,omitempty"`
Type string `protobuf:"bytes,4,opt,name=type,proto3" json:"type,omitempty"`
CredentialsJson []byte `protobuf:"bytes,5,opt,name=credentials_json,json=credentialsJson,proto3" json:"credentials_json,omitempty"`
ProxyUrl string `protobuf:"bytes,6,opt,name=proxy_url,json=proxyUrl,proto3" json:"proxy_url,omitempty"`
// contains filtered or unexported fields
}
func (*AccountProto) Descriptor
deprecated
func (*AccountProto) Descriptor() ([]byte, []int)
Deprecated: Use AccountProto.ProtoReflect.Descriptor instead.
func (*AccountProto) GetCredentialsJson ¶
func (x *AccountProto) GetCredentialsJson() []byte
func (*AccountProto) GetId ¶
func (x *AccountProto) GetId() int64
func (*AccountProto) GetName ¶
func (x *AccountProto) GetName() string
func (*AccountProto) GetPlatform ¶
func (x *AccountProto) GetPlatform() string
func (*AccountProto) GetProxyUrl ¶
func (x *AccountProto) GetProxyUrl() string
func (*AccountProto) GetType ¶
func (x *AccountProto) GetType() string
func (*AccountProto) ProtoMessage ¶
func (*AccountProto) ProtoMessage()
func (*AccountProto) ProtoReflect ¶
func (x *AccountProto) ProtoReflect() protoreflect.Message
func (*AccountProto) Reset ¶
func (x *AccountProto) Reset()
func (*AccountProto) String ¶
func (x *AccountProto) String() string
type AccountTypeProto ¶
type AccountTypeProto struct {
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
Label string `protobuf:"bytes,2,opt,name=label,proto3" json:"label,omitempty"`
Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
Fields []*CredentialFieldProto `protobuf:"bytes,4,rep,name=fields,proto3" json:"fields,omitempty"`
// contains filtered or unexported fields
}
func (*AccountTypeProto) Descriptor
deprecated
func (*AccountTypeProto) Descriptor() ([]byte, []int)
Deprecated: Use AccountTypeProto.ProtoReflect.Descriptor instead.
func (*AccountTypeProto) GetDescription ¶
func (x *AccountTypeProto) GetDescription() string
func (*AccountTypeProto) GetFields ¶
func (x *AccountTypeProto) GetFields() []*CredentialFieldProto
func (*AccountTypeProto) GetKey ¶
func (x *AccountTypeProto) GetKey() string
func (*AccountTypeProto) GetLabel ¶
func (x *AccountTypeProto) GetLabel() string
func (*AccountTypeProto) ProtoMessage ¶
func (*AccountTypeProto) ProtoMessage()
func (*AccountTypeProto) ProtoReflect ¶
func (x *AccountTypeProto) ProtoReflect() protoreflect.Message
func (*AccountTypeProto) Reset ¶
func (x *AccountTypeProto) Reset()
func (*AccountTypeProto) String ¶
func (x *AccountTypeProto) String() string
type BackgroundTaskProto ¶
type BackgroundTaskProto struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
IntervalMs int64 `protobuf:"varint,2,opt,name=interval_ms,json=intervalMs,proto3" json:"interval_ms,omitempty"`
// contains filtered or unexported fields
}
func (*BackgroundTaskProto) Descriptor
deprecated
func (*BackgroundTaskProto) Descriptor() ([]byte, []int)
Deprecated: Use BackgroundTaskProto.ProtoReflect.Descriptor instead.
func (*BackgroundTaskProto) GetIntervalMs ¶
func (x *BackgroundTaskProto) GetIntervalMs() int64
func (*BackgroundTaskProto) GetName ¶
func (x *BackgroundTaskProto) GetName() string
func (*BackgroundTaskProto) ProtoMessage ¶
func (*BackgroundTaskProto) ProtoMessage()
func (*BackgroundTaskProto) ProtoReflect ¶
func (x *BackgroundTaskProto) ProtoReflect() protoreflect.Message
func (*BackgroundTaskProto) Reset ¶
func (x *BackgroundTaskProto) Reset()
func (*BackgroundTaskProto) String ¶
func (x *BackgroundTaskProto) String() string
type BackgroundTasksResponse ¶
type BackgroundTasksResponse struct {
Tasks []*BackgroundTaskProto `protobuf:"bytes,1,rep,name=tasks,proto3" json:"tasks,omitempty"`
// contains filtered or unexported fields
}
func (*BackgroundTasksResponse) Descriptor
deprecated
func (*BackgroundTasksResponse) Descriptor() ([]byte, []int)
Deprecated: Use BackgroundTasksResponse.ProtoReflect.Descriptor instead.
func (*BackgroundTasksResponse) GetTasks ¶
func (x *BackgroundTasksResponse) GetTasks() []*BackgroundTaskProto
func (*BackgroundTasksResponse) ProtoMessage ¶
func (*BackgroundTasksResponse) ProtoMessage()
func (*BackgroundTasksResponse) ProtoReflect ¶
func (x *BackgroundTasksResponse) ProtoReflect() protoreflect.Message
func (*BackgroundTasksResponse) Reset ¶
func (x *BackgroundTasksResponse) Reset()
func (*BackgroundTasksResponse) String ¶
func (x *BackgroundTasksResponse) String() string
type ConfigFieldProto ¶
type ConfigFieldProto struct {
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
Label string `protobuf:"bytes,2,opt,name=label,proto3" json:"label,omitempty"`
Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"`
Required bool `protobuf:"varint,4,opt,name=required,proto3" json:"required,omitempty"`
DefaultValue string `protobuf:"bytes,5,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"`
Description string `protobuf:"bytes,6,opt,name=description,proto3" json:"description,omitempty"`
Placeholder string `protobuf:"bytes,7,opt,name=placeholder,proto3" json:"placeholder,omitempty"`
// contains filtered or unexported fields
}
func (*ConfigFieldProto) Descriptor
deprecated
func (*ConfigFieldProto) Descriptor() ([]byte, []int)
Deprecated: Use ConfigFieldProto.ProtoReflect.Descriptor instead.
func (*ConfigFieldProto) GetDefaultValue ¶
func (x *ConfigFieldProto) GetDefaultValue() string
func (*ConfigFieldProto) GetDescription ¶
func (x *ConfigFieldProto) GetDescription() string
func (*ConfigFieldProto) GetKey ¶
func (x *ConfigFieldProto) GetKey() string
func (*ConfigFieldProto) GetLabel ¶
func (x *ConfigFieldProto) GetLabel() string
func (*ConfigFieldProto) GetPlaceholder ¶
func (x *ConfigFieldProto) GetPlaceholder() string
func (*ConfigFieldProto) GetRequired ¶
func (x *ConfigFieldProto) GetRequired() bool
func (*ConfigFieldProto) GetType ¶
func (x *ConfigFieldProto) GetType() string
func (*ConfigFieldProto) ProtoMessage ¶
func (*ConfigFieldProto) ProtoMessage()
func (*ConfigFieldProto) ProtoReflect ¶
func (x *ConfigFieldProto) ProtoReflect() protoreflect.Message
func (*ConfigFieldProto) Reset ¶
func (x *ConfigFieldProto) Reset()
func (*ConfigFieldProto) String ¶
func (x *ConfigFieldProto) String() string
type CoreInvokeServiceClient ¶
type CoreInvokeServiceClient interface {
Invoke(ctx context.Context, in *HostInvokeRequest, opts ...grpc.CallOption) (*HostInvokeResponse, error)
InvokeStream(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[HostStreamFrame, HostStreamFrame], error)
}
CoreInvokeServiceClient is the client API for CoreInvokeService 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.
==================== Host 服务(反向调用:插件 → Core) ====================
由 Core 实现,通过 hashicorp/go-plugin 的 GRPCBroker 暴露给插件子进程。 SDK 只定义通用 Invoke / InvokeStream 通道;Core 通过方法注册表决定开放哪些方法、 允许哪些插件调用、请求/响应 schema、是否支持流式以及幂等策略。
func NewCoreInvokeServiceClient ¶
func NewCoreInvokeServiceClient(cc grpc.ClientConnInterface) CoreInvokeServiceClient
type CoreInvokeServiceServer ¶
type CoreInvokeServiceServer interface {
Invoke(context.Context, *HostInvokeRequest) (*HostInvokeResponse, error)
InvokeStream(grpc.BidiStreamingServer[HostStreamFrame, HostStreamFrame]) error
// contains filtered or unexported methods
}
CoreInvokeServiceServer is the server API for CoreInvokeService service. All implementations must embed UnimplementedCoreInvokeServiceServer for forward compatibility.
==================== Host 服务(反向调用:插件 → Core) ====================
由 Core 实现,通过 hashicorp/go-plugin 的 GRPCBroker 暴露给插件子进程。 SDK 只定义通用 Invoke / InvokeStream 通道;Core 通过方法注册表决定开放哪些方法、 允许哪些插件调用、请求/响应 schema、是否支持流式以及幂等策略。
type CoreInvokeService_InvokeStreamClient ¶
type CoreInvokeService_InvokeStreamClient = grpc.BidiStreamingClient[HostStreamFrame, HostStreamFrame]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type CoreInvokeService_InvokeStreamServer ¶
type CoreInvokeService_InvokeStreamServer = grpc.BidiStreamingServer[HostStreamFrame, HostStreamFrame]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type CredentialFieldProto ¶
type CredentialFieldProto struct {
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
Label string `protobuf:"bytes,2,opt,name=label,proto3" json:"label,omitempty"`
Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"`
Required bool `protobuf:"varint,4,opt,name=required,proto3" json:"required,omitempty"`
Placeholder string `protobuf:"bytes,5,opt,name=placeholder,proto3" json:"placeholder,omitempty"`
EditDisabled bool `protobuf:"varint,6,opt,name=edit_disabled,json=editDisabled,proto3" json:"edit_disabled,omitempty"` // 编辑模式下隐藏该字段
// contains filtered or unexported fields
}
func (*CredentialFieldProto) Descriptor
deprecated
func (*CredentialFieldProto) Descriptor() ([]byte, []int)
Deprecated: Use CredentialFieldProto.ProtoReflect.Descriptor instead.
func (*CredentialFieldProto) GetEditDisabled ¶
func (x *CredentialFieldProto) GetEditDisabled() bool
func (*CredentialFieldProto) GetKey ¶
func (x *CredentialFieldProto) GetKey() string
func (*CredentialFieldProto) GetLabel ¶
func (x *CredentialFieldProto) GetLabel() string
func (*CredentialFieldProto) GetPlaceholder ¶
func (x *CredentialFieldProto) GetPlaceholder() string
func (*CredentialFieldProto) GetRequired ¶
func (x *CredentialFieldProto) GetRequired() bool
func (*CredentialFieldProto) GetType ¶
func (x *CredentialFieldProto) GetType() string
func (*CredentialFieldProto) ProtoMessage ¶
func (*CredentialFieldProto) ProtoMessage()
func (*CredentialFieldProto) ProtoReflect ¶
func (x *CredentialFieldProto) ProtoReflect() protoreflect.Message
func (*CredentialFieldProto) Reset ¶
func (x *CredentialFieldProto) Reset()
func (*CredentialFieldProto) String ¶
func (x *CredentialFieldProto) String() string
type CredentialsRequest ¶
type CredentialsRequest struct {
Credentials map[string]string `` /* 149-byte string literal not displayed */
// contains filtered or unexported fields
}
func (*CredentialsRequest) Descriptor
deprecated
func (*CredentialsRequest) Descriptor() ([]byte, []int)
Deprecated: Use CredentialsRequest.ProtoReflect.Descriptor instead.
func (*CredentialsRequest) GetCredentials ¶
func (x *CredentialsRequest) GetCredentials() map[string]string
func (*CredentialsRequest) ProtoMessage ¶
func (*CredentialsRequest) ProtoMessage()
func (*CredentialsRequest) ProtoReflect ¶
func (x *CredentialsRequest) ProtoReflect() protoreflect.Message
func (*CredentialsRequest) Reset ¶
func (x *CredentialsRequest) Reset()
func (*CredentialsRequest) String ¶
func (x *CredentialsRequest) String() string
type DispatchCandidateProto ¶ added in v0.2.3
type DispatchCandidateProto struct {
Scheduling string `protobuf:"bytes,1,opt,name=scheduling,proto3" json:"scheduling,omitempty"`
Wire string `protobuf:"bytes,2,opt,name=wire,proto3" json:"wire,omitempty"`
// contains filtered or unexported fields
}
func (*DispatchCandidateProto) Descriptor
deprecated
added in
v0.2.3
func (*DispatchCandidateProto) Descriptor() ([]byte, []int)
Deprecated: Use DispatchCandidateProto.ProtoReflect.Descriptor instead.
func (*DispatchCandidateProto) GetScheduling ¶ added in v0.2.3
func (x *DispatchCandidateProto) GetScheduling() string
func (*DispatchCandidateProto) GetWire ¶ added in v0.2.3
func (x *DispatchCandidateProto) GetWire() string
func (*DispatchCandidateProto) ProtoMessage ¶ added in v0.2.3
func (*DispatchCandidateProto) ProtoMessage()
func (*DispatchCandidateProto) ProtoReflect ¶ added in v0.2.3
func (x *DispatchCandidateProto) ProtoReflect() protoreflect.Message
func (*DispatchCandidateProto) Reset ¶ added in v0.2.3
func (x *DispatchCandidateProto) Reset()
func (*DispatchCandidateProto) String ¶ added in v0.2.3
func (x *DispatchCandidateProto) String() string
type DispatchDSLProto ¶ added in v0.2.3
type DispatchDSLProto struct {
Rules []*DispatchRuleProto `protobuf:"bytes,1,rep,name=rules,proto3" json:"rules,omitempty"`
// contains filtered or unexported fields
}
func (*DispatchDSLProto) Descriptor
deprecated
added in
v0.2.3
func (*DispatchDSLProto) Descriptor() ([]byte, []int)
Deprecated: Use DispatchDSLProto.ProtoReflect.Descriptor instead.
func (*DispatchDSLProto) GetRules ¶ added in v0.2.3
func (x *DispatchDSLProto) GetRules() []*DispatchRuleProto
func (*DispatchDSLProto) ProtoMessage ¶ added in v0.2.3
func (*DispatchDSLProto) ProtoMessage()
func (*DispatchDSLProto) ProtoReflect ¶ added in v0.2.3
func (x *DispatchDSLProto) ProtoReflect() protoreflect.Message
func (*DispatchDSLProto) Reset ¶ added in v0.2.3
func (x *DispatchDSLProto) Reset()
func (*DispatchDSLProto) String ¶ added in v0.2.3
func (x *DispatchDSLProto) String() string
type DispatchGateProto ¶ added in v0.2.3
type DispatchGateProto struct {
RequiredOperation string `protobuf:"bytes,1,opt,name=required_operation,json=requiredOperation,proto3" json:"required_operation,omitempty"`
Status int32 `protobuf:"varint,2,opt,name=status,proto3" json:"status,omitempty"`
ErrorType string `protobuf:"bytes,3,opt,name=error_type,json=errorType,proto3" json:"error_type,omitempty"`
Code string `protobuf:"bytes,4,opt,name=code,proto3" json:"code,omitempty"`
Message string `protobuf:"bytes,5,opt,name=message,proto3" json:"message,omitempty"`
// contains filtered or unexported fields
}
func (*DispatchGateProto) Descriptor
deprecated
added in
v0.2.3
func (*DispatchGateProto) Descriptor() ([]byte, []int)
Deprecated: Use DispatchGateProto.ProtoReflect.Descriptor instead.
func (*DispatchGateProto) GetCode ¶ added in v0.2.3
func (x *DispatchGateProto) GetCode() string
func (*DispatchGateProto) GetErrorType ¶ added in v0.2.3
func (x *DispatchGateProto) GetErrorType() string
func (*DispatchGateProto) GetMessage ¶ added in v0.2.3
func (x *DispatchGateProto) GetMessage() string
func (*DispatchGateProto) GetRequiredOperation ¶ added in v0.2.3
func (x *DispatchGateProto) GetRequiredOperation() string
func (*DispatchGateProto) GetStatus ¶ added in v0.2.3
func (x *DispatchGateProto) GetStatus() int32
func (*DispatchGateProto) ProtoMessage ¶ added in v0.2.3
func (*DispatchGateProto) ProtoMessage()
func (*DispatchGateProto) ProtoReflect ¶ added in v0.2.3
func (x *DispatchGateProto) ProtoReflect() protoreflect.Message
func (*DispatchGateProto) Reset ¶ added in v0.2.3
func (x *DispatchGateProto) Reset()
func (*DispatchGateProto) String ¶ added in v0.2.3
func (x *DispatchGateProto) String() string
type DispatchModelProto ¶ added in v0.2.3
type DispatchModelProto struct {
StripSuffix string `protobuf:"bytes,1,opt,name=strip_suffix,json=stripSuffix,proto3" json:"strip_suffix,omitempty"`
// contains filtered or unexported fields
}
func (*DispatchModelProto) Descriptor
deprecated
added in
v0.2.3
func (*DispatchModelProto) Descriptor() ([]byte, []int)
Deprecated: Use DispatchModelProto.ProtoReflect.Descriptor instead.
func (*DispatchModelProto) GetStripSuffix ¶ added in v0.2.3
func (x *DispatchModelProto) GetStripSuffix() string
func (*DispatchModelProto) ProtoMessage ¶ added in v0.2.3
func (*DispatchModelProto) ProtoMessage()
func (*DispatchModelProto) ProtoReflect ¶ added in v0.2.3
func (x *DispatchModelProto) ProtoReflect() protoreflect.Message
func (*DispatchModelProto) Reset ¶ added in v0.2.3
func (x *DispatchModelProto) Reset()
func (*DispatchModelProto) String ¶ added in v0.2.3
func (x *DispatchModelProto) String() string
type DispatchPlanProto ¶ added in v0.2.3
type DispatchPlanProto struct {
ClientModel string `protobuf:"bytes,1,opt,name=client_model,json=clientModel,proto3" json:"client_model,omitempty"`
SchedulingModel string `protobuf:"bytes,2,opt,name=scheduling_model,json=schedulingModel,proto3" json:"scheduling_model,omitempty"`
WireModel string `protobuf:"bytes,3,opt,name=wire_model,json=wireModel,proto3" json:"wire_model,omitempty"`
RuleId string `protobuf:"bytes,4,opt,name=rule_id,json=ruleId,proto3" json:"rule_id,omitempty"`
Operation string `protobuf:"bytes,5,opt,name=operation,proto3" json:"operation,omitempty"`
TimeoutProfile string `protobuf:"bytes,6,opt,name=timeout_profile,json=timeoutProfile,proto3" json:"timeout_profile,omitempty"`
Gate *DispatchGateProto `protobuf:"bytes,7,opt,name=gate,proto3" json:"gate,omitempty"`
// contains filtered or unexported fields
}
func (*DispatchPlanProto) Descriptor
deprecated
added in
v0.2.3
func (*DispatchPlanProto) Descriptor() ([]byte, []int)
Deprecated: Use DispatchPlanProto.ProtoReflect.Descriptor instead.
func (*DispatchPlanProto) GetClientModel ¶ added in v0.2.3
func (x *DispatchPlanProto) GetClientModel() string
func (*DispatchPlanProto) GetGate ¶ added in v0.2.3
func (x *DispatchPlanProto) GetGate() *DispatchGateProto
func (*DispatchPlanProto) GetOperation ¶ added in v0.2.3
func (x *DispatchPlanProto) GetOperation() string
func (*DispatchPlanProto) GetRuleId ¶ added in v0.2.3
func (x *DispatchPlanProto) GetRuleId() string
func (*DispatchPlanProto) GetSchedulingModel ¶ added in v0.2.3
func (x *DispatchPlanProto) GetSchedulingModel() string
func (*DispatchPlanProto) GetTimeoutProfile ¶ added in v0.2.3
func (x *DispatchPlanProto) GetTimeoutProfile() string
func (*DispatchPlanProto) GetWireModel ¶ added in v0.2.3
func (x *DispatchPlanProto) GetWireModel() string
func (*DispatchPlanProto) ProtoMessage ¶ added in v0.2.3
func (*DispatchPlanProto) ProtoMessage()
func (*DispatchPlanProto) ProtoReflect ¶ added in v0.2.3
func (x *DispatchPlanProto) ProtoReflect() protoreflect.Message
func (*DispatchPlanProto) Reset ¶ added in v0.2.3
func (x *DispatchPlanProto) Reset()
func (*DispatchPlanProto) String ¶ added in v0.2.3
func (x *DispatchPlanProto) String() string
type DispatchRuleProto ¶ added in v0.2.3
type DispatchRuleProto struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
When *DispatchWhenProto `protobuf:"bytes,2,opt,name=when,proto3" json:"when,omitempty"`
Model *DispatchModelProto `protobuf:"bytes,3,opt,name=model,proto3" json:"model,omitempty"`
Operation string `protobuf:"bytes,4,opt,name=operation,proto3" json:"operation,omitempty"`
TimeoutProfile string `protobuf:"bytes,5,opt,name=timeout_profile,json=timeoutProfile,proto3" json:"timeout_profile,omitempty"`
Gate *DispatchGateProto `protobuf:"bytes,6,opt,name=gate,proto3" json:"gate,omitempty"`
Candidates []*DispatchCandidateProto `protobuf:"bytes,7,rep,name=candidates,proto3" json:"candidates,omitempty"`
// contains filtered or unexported fields
}
func (*DispatchRuleProto) Descriptor
deprecated
added in
v0.2.3
func (*DispatchRuleProto) Descriptor() ([]byte, []int)
Deprecated: Use DispatchRuleProto.ProtoReflect.Descriptor instead.
func (*DispatchRuleProto) GetCandidates ¶ added in v0.2.3
func (x *DispatchRuleProto) GetCandidates() []*DispatchCandidateProto
func (*DispatchRuleProto) GetGate ¶ added in v0.2.3
func (x *DispatchRuleProto) GetGate() *DispatchGateProto
func (*DispatchRuleProto) GetId ¶ added in v0.2.3
func (x *DispatchRuleProto) GetId() string
func (*DispatchRuleProto) GetModel ¶ added in v0.2.3
func (x *DispatchRuleProto) GetModel() *DispatchModelProto
func (*DispatchRuleProto) GetOperation ¶ added in v0.2.3
func (x *DispatchRuleProto) GetOperation() string
func (*DispatchRuleProto) GetTimeoutProfile ¶ added in v0.2.3
func (x *DispatchRuleProto) GetTimeoutProfile() string
func (*DispatchRuleProto) GetWhen ¶ added in v0.2.3
func (x *DispatchRuleProto) GetWhen() *DispatchWhenProto
func (*DispatchRuleProto) ProtoMessage ¶ added in v0.2.3
func (*DispatchRuleProto) ProtoMessage()
func (*DispatchRuleProto) ProtoReflect ¶ added in v0.2.3
func (x *DispatchRuleProto) ProtoReflect() protoreflect.Message
func (*DispatchRuleProto) Reset ¶ added in v0.2.3
func (x *DispatchRuleProto) Reset()
func (*DispatchRuleProto) String ¶ added in v0.2.3
func (x *DispatchRuleProto) String() string
type DispatchWhenProto ¶ added in v0.2.3
type DispatchWhenProto struct {
Methods []string `protobuf:"bytes,1,rep,name=methods,proto3" json:"methods,omitempty"`
Paths []string `protobuf:"bytes,2,rep,name=paths,proto3" json:"paths,omitempty"`
PathPrefixes []string `protobuf:"bytes,3,rep,name=path_prefixes,json=pathPrefixes,proto3" json:"path_prefixes,omitempty"`
Models []string `protobuf:"bytes,4,rep,name=models,proto3" json:"models,omitempty"`
ModelPrefixes []string `protobuf:"bytes,5,rep,name=model_prefixes,json=modelPrefixes,proto3" json:"model_prefixes,omitempty"`
ModelSuffixes []string `protobuf:"bytes,6,rep,name=model_suffixes,json=modelSuffixes,proto3" json:"model_suffixes,omitempty"`
// contains filtered or unexported fields
}
func (*DispatchWhenProto) Descriptor
deprecated
added in
v0.2.3
func (*DispatchWhenProto) Descriptor() ([]byte, []int)
Deprecated: Use DispatchWhenProto.ProtoReflect.Descriptor instead.
func (*DispatchWhenProto) GetMethods ¶ added in v0.2.3
func (x *DispatchWhenProto) GetMethods() []string
func (*DispatchWhenProto) GetModelPrefixes ¶ added in v0.2.3
func (x *DispatchWhenProto) GetModelPrefixes() []string
func (*DispatchWhenProto) GetModelSuffixes ¶ added in v0.2.3
func (x *DispatchWhenProto) GetModelSuffixes() []string
func (*DispatchWhenProto) GetModels ¶ added in v0.2.3
func (x *DispatchWhenProto) GetModels() []string
func (*DispatchWhenProto) GetPathPrefixes ¶ added in v0.2.3
func (x *DispatchWhenProto) GetPathPrefixes() []string
func (*DispatchWhenProto) GetPaths ¶ added in v0.2.3
func (x *DispatchWhenProto) GetPaths() []string
func (*DispatchWhenProto) ProtoMessage ¶ added in v0.2.3
func (*DispatchWhenProto) ProtoMessage()
func (*DispatchWhenProto) ProtoReflect ¶ added in v0.2.3
func (x *DispatchWhenProto) ProtoReflect() protoreflect.Message
func (*DispatchWhenProto) Reset ¶ added in v0.2.3
func (x *DispatchWhenProto) Reset()
func (*DispatchWhenProto) String ¶ added in v0.2.3
func (x *DispatchWhenProto) String() string
type Empty ¶
type Empty struct {
// contains filtered or unexported fields
}
func (*Empty) Descriptor
deprecated
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
func (*Empty) ProtoReflect ¶
func (x *Empty) ProtoReflect() protoreflect.Message
type EventHandleResponse ¶
type EventHandleResponse struct {
Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
ErrorMessage string `protobuf:"bytes,2,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"`
// contains filtered or unexported fields
}
func (*EventHandleResponse) Descriptor
deprecated
func (*EventHandleResponse) Descriptor() ([]byte, []int)
Deprecated: Use EventHandleResponse.ProtoReflect.Descriptor instead.
func (*EventHandleResponse) GetErrorMessage ¶
func (x *EventHandleResponse) GetErrorMessage() string
func (*EventHandleResponse) GetSuccess ¶
func (x *EventHandleResponse) GetSuccess() bool
func (*EventHandleResponse) ProtoMessage ¶
func (*EventHandleResponse) ProtoMessage()
func (*EventHandleResponse) ProtoReflect ¶
func (x *EventHandleResponse) ProtoReflect() protoreflect.Message
func (*EventHandleResponse) Reset ¶
func (x *EventHandleResponse) Reset()
func (*EventHandleResponse) String ¶
func (x *EventHandleResponse) String() string
type EventSchemaProto ¶
type EventSchemaProto struct {
Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
Source string `protobuf:"bytes,2,opt,name=source,proto3" json:"source,omitempty"`
Summary string `protobuf:"bytes,3,opt,name=summary,proto3" json:"summary,omitempty"`
Payload *PayloadSchemaProto `protobuf:"bytes,4,opt,name=payload,proto3" json:"payload,omitempty"`
Metadata map[string]string `` /* 143-byte string literal not displayed */
// contains filtered or unexported fields
}
func (*EventSchemaProto) Descriptor
deprecated
func (*EventSchemaProto) Descriptor() ([]byte, []int)
Deprecated: Use EventSchemaProto.ProtoReflect.Descriptor instead.
func (*EventSchemaProto) GetMetadata ¶
func (x *EventSchemaProto) GetMetadata() map[string]string
func (*EventSchemaProto) GetPayload ¶
func (x *EventSchemaProto) GetPayload() *PayloadSchemaProto
func (*EventSchemaProto) GetSource ¶
func (x *EventSchemaProto) GetSource() string
func (*EventSchemaProto) GetSummary ¶
func (x *EventSchemaProto) GetSummary() string
func (*EventSchemaProto) GetType ¶
func (x *EventSchemaProto) GetType() string
func (*EventSchemaProto) ProtoMessage ¶
func (*EventSchemaProto) ProtoMessage()
func (*EventSchemaProto) ProtoReflect ¶
func (x *EventSchemaProto) ProtoReflect() protoreflect.Message
func (*EventSchemaProto) Reset ¶
func (x *EventSchemaProto) Reset()
func (*EventSchemaProto) String ¶
func (x *EventSchemaProto) String() string
type EventServiceClient ¶
type EventServiceClient interface {
GetEventSubscriptions(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*EventSubscriptionsResponse, error)
HandleEvent(ctx context.Context, in *PluginEvent, opts ...grpc.CallOption) (*EventHandleResponse, error)
}
EventServiceClient is the client API for EventService 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.
func NewEventServiceClient ¶
func NewEventServiceClient(cc grpc.ClientConnInterface) EventServiceClient
type EventServiceServer ¶
type EventServiceServer interface {
GetEventSubscriptions(context.Context, *Empty) (*EventSubscriptionsResponse, error)
HandleEvent(context.Context, *PluginEvent) (*EventHandleResponse, error)
// contains filtered or unexported methods
}
EventServiceServer is the server API for EventService service. All implementations must embed UnimplementedEventServiceServer for forward compatibility.
type EventSubscriptionProto ¶
type EventSubscriptionProto struct {
Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
Source string `protobuf:"bytes,2,opt,name=source,proto3" json:"source,omitempty"`
Filter map[string]string `` /* 139-byte string literal not displayed */
Metadata map[string]string `` /* 143-byte string literal not displayed */
// contains filtered or unexported fields
}
func (*EventSubscriptionProto) Descriptor
deprecated
func (*EventSubscriptionProto) Descriptor() ([]byte, []int)
Deprecated: Use EventSubscriptionProto.ProtoReflect.Descriptor instead.
func (*EventSubscriptionProto) GetFilter ¶
func (x *EventSubscriptionProto) GetFilter() map[string]string
func (*EventSubscriptionProto) GetMetadata ¶
func (x *EventSubscriptionProto) GetMetadata() map[string]string
func (*EventSubscriptionProto) GetSource ¶
func (x *EventSubscriptionProto) GetSource() string
func (*EventSubscriptionProto) GetType ¶
func (x *EventSubscriptionProto) GetType() string
func (*EventSubscriptionProto) ProtoMessage ¶
func (*EventSubscriptionProto) ProtoMessage()
func (*EventSubscriptionProto) ProtoReflect ¶
func (x *EventSubscriptionProto) ProtoReflect() protoreflect.Message
func (*EventSubscriptionProto) Reset ¶
func (x *EventSubscriptionProto) Reset()
func (*EventSubscriptionProto) String ¶
func (x *EventSubscriptionProto) String() string
type EventSubscriptionsResponse ¶
type EventSubscriptionsResponse struct {
Subscriptions []*EventSubscriptionProto `protobuf:"bytes,1,rep,name=subscriptions,proto3" json:"subscriptions,omitempty"`
// contains filtered or unexported fields
}
func (*EventSubscriptionsResponse) Descriptor
deprecated
func (*EventSubscriptionsResponse) Descriptor() ([]byte, []int)
Deprecated: Use EventSubscriptionsResponse.ProtoReflect.Descriptor instead.
func (*EventSubscriptionsResponse) GetSubscriptions ¶
func (x *EventSubscriptionsResponse) GetSubscriptions() []*EventSubscriptionProto
func (*EventSubscriptionsResponse) ProtoMessage ¶
func (*EventSubscriptionsResponse) ProtoMessage()
func (*EventSubscriptionsResponse) ProtoReflect ¶
func (x *EventSubscriptionsResponse) ProtoReflect() protoreflect.Message
func (*EventSubscriptionsResponse) Reset ¶
func (x *EventSubscriptionsResponse) Reset()
func (*EventSubscriptionsResponse) String ¶
func (x *EventSubscriptionsResponse) String() string
type ExtensionServiceClient ¶
type ExtensionServiceClient interface {
Migrate(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error)
GetBackgroundTasks(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*BackgroundTasksResponse, error)
// 由 Core 调度器按 Interval 周期触发;插件进程内查表执行 Handler
RunBackgroundTask(ctx context.Context, in *RunBackgroundTaskRequest, opts ...grpc.CallOption) (*Empty, error)
// HTTP 请求由核心代理到插件
HandleRequest(ctx context.Context, in *HttpRequest, opts ...grpc.CallOption) (*HttpResponse, error)
HandleStreamRequest(ctx context.Context, in *HttpRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[HttpResponseChunk], error)
// 异步任务:Core 分发 pending 任务给插件处理
ProcessTask(ctx context.Context, in *ProcessTaskRequest, opts ...grpc.CallOption) (*ProcessTaskResponse, error)
// 返回此插件支持的任务类型列表
GetTaskTypes(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*TaskTypesResponse, error)
}
ExtensionServiceClient is the client API for ExtensionService 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.
func NewExtensionServiceClient ¶
func NewExtensionServiceClient(cc grpc.ClientConnInterface) ExtensionServiceClient
type ExtensionServiceServer ¶
type ExtensionServiceServer interface {
Migrate(context.Context, *Empty) (*Empty, error)
GetBackgroundTasks(context.Context, *Empty) (*BackgroundTasksResponse, error)
// 由 Core 调度器按 Interval 周期触发;插件进程内查表执行 Handler
RunBackgroundTask(context.Context, *RunBackgroundTaskRequest) (*Empty, error)
// HTTP 请求由核心代理到插件
HandleRequest(context.Context, *HttpRequest) (*HttpResponse, error)
HandleStreamRequest(*HttpRequest, grpc.ServerStreamingServer[HttpResponseChunk]) error
// 异步任务:Core 分发 pending 任务给插件处理
ProcessTask(context.Context, *ProcessTaskRequest) (*ProcessTaskResponse, error)
// 返回此插件支持的任务类型列表
GetTaskTypes(context.Context, *Empty) (*TaskTypesResponse, error)
// contains filtered or unexported methods
}
ExtensionServiceServer is the server API for ExtensionService service. All implementations must embed UnimplementedExtensionServiceServer for forward compatibility.
type ExtensionService_HandleStreamRequestClient ¶
type ExtensionService_HandleStreamRequestClient = grpc.ServerStreamingClient[HttpResponseChunk]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type ExtensionService_HandleStreamRequestServer ¶
type ExtensionService_HandleStreamRequestServer = grpc.ServerStreamingServer[HttpResponseChunk]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type ForwardChunk ¶
type ForwardChunk struct {
Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
Done bool `protobuf:"varint,2,opt,name=done,proto3" json:"done,omitempty"`
FinalOutcome *ForwardOutcome `protobuf:"bytes,3,opt,name=final_outcome,json=finalOutcome,proto3" json:"final_outcome,omitempty"`
StatusCode int32 `protobuf:"varint,4,opt,name=status_code,json=statusCode,proto3" json:"status_code,omitempty"`
Headers map[string]*HeaderValues `` /* 141-byte string literal not displayed */
// contains filtered or unexported fields
}
func (*ForwardChunk) Descriptor
deprecated
func (*ForwardChunk) Descriptor() ([]byte, []int)
Deprecated: Use ForwardChunk.ProtoReflect.Descriptor instead.
func (*ForwardChunk) GetData ¶
func (x *ForwardChunk) GetData() []byte
func (*ForwardChunk) GetDone ¶
func (x *ForwardChunk) GetDone() bool
func (*ForwardChunk) GetFinalOutcome ¶
func (x *ForwardChunk) GetFinalOutcome() *ForwardOutcome
func (*ForwardChunk) GetHeaders ¶
func (x *ForwardChunk) GetHeaders() map[string]*HeaderValues
func (*ForwardChunk) GetStatusCode ¶
func (x *ForwardChunk) GetStatusCode() int32
func (*ForwardChunk) ProtoMessage ¶
func (*ForwardChunk) ProtoMessage()
func (*ForwardChunk) ProtoReflect ¶
func (x *ForwardChunk) ProtoReflect() protoreflect.Message
func (*ForwardChunk) Reset ¶
func (x *ForwardChunk) Reset()
func (*ForwardChunk) String ¶
func (x *ForwardChunk) String() string
type ForwardOutcome ¶
type ForwardOutcome struct {
Kind OutcomeKind `protobuf:"varint,1,opt,name=kind,proto3,enum=airgate.plugin.v1.OutcomeKind" json:"kind,omitempty"`
Upstream *UpstreamResponse `protobuf:"bytes,2,opt,name=upstream,proto3" json:"upstream,omitempty"`
Usage *Usage `protobuf:"bytes,3,opt,name=usage,proto3" json:"usage,omitempty"`
DurationMs int64 `protobuf:"varint,4,opt,name=duration_ms,json=durationMs,proto3" json:"duration_ms,omitempty"`
RetryAfterMs int64 `protobuf:"varint,5,opt,name=retry_after_ms,json=retryAfterMs,proto3" json:"retry_after_ms,omitempty"`
Reason string `protobuf:"bytes,6,opt,name=reason,proto3" json:"reason,omitempty"`
UpdatedCredentials map[string]string `` /* 189-byte string literal not displayed */
FailoverScope string `protobuf:"bytes,8,opt,name=failover_scope,json=failoverScope,proto3" json:"failover_scope,omitempty"`
// contains filtered or unexported fields
}
ForwardOutcome 插件对一次 Forward 的完整判决结果。
func (*ForwardOutcome) Descriptor
deprecated
func (*ForwardOutcome) Descriptor() ([]byte, []int)
Deprecated: Use ForwardOutcome.ProtoReflect.Descriptor instead.
func (*ForwardOutcome) GetDurationMs ¶
func (x *ForwardOutcome) GetDurationMs() int64
func (*ForwardOutcome) GetFailoverScope ¶ added in v0.2.3
func (x *ForwardOutcome) GetFailoverScope() string
func (*ForwardOutcome) GetKind ¶
func (x *ForwardOutcome) GetKind() OutcomeKind
func (*ForwardOutcome) GetReason ¶
func (x *ForwardOutcome) GetReason() string
func (*ForwardOutcome) GetRetryAfterMs ¶
func (x *ForwardOutcome) GetRetryAfterMs() int64
func (*ForwardOutcome) GetUpdatedCredentials ¶
func (x *ForwardOutcome) GetUpdatedCredentials() map[string]string
func (*ForwardOutcome) GetUpstream ¶
func (x *ForwardOutcome) GetUpstream() *UpstreamResponse
func (*ForwardOutcome) GetUsage ¶
func (x *ForwardOutcome) GetUsage() *Usage
func (*ForwardOutcome) ProtoMessage ¶
func (*ForwardOutcome) ProtoMessage()
func (*ForwardOutcome) ProtoReflect ¶
func (x *ForwardOutcome) ProtoReflect() protoreflect.Message
func (*ForwardOutcome) Reset ¶
func (x *ForwardOutcome) Reset()
func (*ForwardOutcome) String ¶
func (x *ForwardOutcome) String() string
type ForwardRequest ¶
type ForwardRequest struct {
Body []byte `protobuf:"bytes,7,opt,name=body,proto3" json:"body,omitempty"`
Headers map[string]*HeaderValues `` /* 141-byte string literal not displayed */
Model string `protobuf:"bytes,9,opt,name=model,proto3" json:"model,omitempty"`
Stream bool `protobuf:"varint,10,opt,name=stream,proto3" json:"stream,omitempty"`
Account *AccountProto `protobuf:"bytes,11,opt,name=account,proto3" json:"account,omitempty"`
DispatchPlan *DispatchPlanProto `protobuf:"bytes,12,opt,name=dispatch_plan,json=dispatchPlan,proto3" json:"dispatch_plan,omitempty"`
// contains filtered or unexported fields
}
func (*ForwardRequest) Descriptor
deprecated
func (*ForwardRequest) Descriptor() ([]byte, []int)
Deprecated: Use ForwardRequest.ProtoReflect.Descriptor instead.
func (*ForwardRequest) GetAccount ¶
func (x *ForwardRequest) GetAccount() *AccountProto
func (*ForwardRequest) GetBody ¶
func (x *ForwardRequest) GetBody() []byte
func (*ForwardRequest) GetDispatchPlan ¶ added in v0.2.3
func (x *ForwardRequest) GetDispatchPlan() *DispatchPlanProto
func (*ForwardRequest) GetHeaders ¶
func (x *ForwardRequest) GetHeaders() map[string]*HeaderValues
func (*ForwardRequest) GetModel ¶
func (x *ForwardRequest) GetModel() string
func (*ForwardRequest) GetStream ¶
func (x *ForwardRequest) GetStream() bool
func (*ForwardRequest) ProtoMessage ¶
func (*ForwardRequest) ProtoMessage()
func (*ForwardRequest) ProtoReflect ¶
func (x *ForwardRequest) ProtoReflect() protoreflect.Message
func (*ForwardRequest) Reset ¶
func (x *ForwardRequest) Reset()
func (*ForwardRequest) String ¶
func (x *ForwardRequest) String() string
type FrontendPageProto ¶
type FrontendPageProto struct {
Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
Icon string `protobuf:"bytes,3,opt,name=icon,proto3" json:"icon,omitempty"`
Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
Audience string `protobuf:"bytes,5,opt,name=audience,proto3" json:"audience,omitempty"` // "admin" | "user" | "all",空 = "admin"
// contains filtered or unexported fields
}
func (*FrontendPageProto) Descriptor
deprecated
func (*FrontendPageProto) Descriptor() ([]byte, []int)
Deprecated: Use FrontendPageProto.ProtoReflect.Descriptor instead.
func (*FrontendPageProto) GetAudience ¶
func (x *FrontendPageProto) GetAudience() string
func (*FrontendPageProto) GetDescription ¶
func (x *FrontendPageProto) GetDescription() string
func (*FrontendPageProto) GetIcon ¶
func (x *FrontendPageProto) GetIcon() string
func (*FrontendPageProto) GetPath ¶
func (x *FrontendPageProto) GetPath() string
func (*FrontendPageProto) GetTitle ¶
func (x *FrontendPageProto) GetTitle() string
func (*FrontendPageProto) ProtoMessage ¶
func (*FrontendPageProto) ProtoMessage()
func (*FrontendPageProto) ProtoReflect ¶
func (x *FrontendPageProto) ProtoReflect() protoreflect.Message
func (*FrontendPageProto) Reset ¶
func (x *FrontendPageProto) Reset()
func (*FrontendPageProto) String ¶
func (x *FrontendPageProto) String() string
type FrontendWidgetProto ¶
type FrontendWidgetProto struct {
Slot string `protobuf:"bytes,1,opt,name=slot,proto3" json:"slot,omitempty"`
EntryFile string `protobuf:"bytes,2,opt,name=entry_file,json=entryFile,proto3" json:"entry_file,omitempty"`
Title string `protobuf:"bytes,3,opt,name=title,proto3" json:"title,omitempty"`
// contains filtered or unexported fields
}
func (*FrontendWidgetProto) Descriptor
deprecated
func (*FrontendWidgetProto) Descriptor() ([]byte, []int)
Deprecated: Use FrontendWidgetProto.ProtoReflect.Descriptor instead.
func (*FrontendWidgetProto) GetEntryFile ¶
func (x *FrontendWidgetProto) GetEntryFile() string
func (*FrontendWidgetProto) GetSlot ¶
func (x *FrontendWidgetProto) GetSlot() string
func (*FrontendWidgetProto) GetTitle ¶
func (x *FrontendWidgetProto) GetTitle() string
func (*FrontendWidgetProto) ProtoMessage ¶
func (*FrontendWidgetProto) ProtoMessage()
func (*FrontendWidgetProto) ProtoReflect ¶
func (x *FrontendWidgetProto) ProtoReflect() protoreflect.Message
func (*FrontendWidgetProto) Reset ¶
func (x *FrontendWidgetProto) Reset()
func (*FrontendWidgetProto) String ¶
func (x *FrontendWidgetProto) String() string
type GatewayServiceClient ¶
type GatewayServiceClient interface {
GetPlatform(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*StringResponse, error)
GetModels(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ModelsResponse, error)
GetRoutes(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*RoutesResponse, error)
Forward(ctx context.Context, in *ForwardRequest, opts ...grpc.CallOption) (*ForwardOutcome, error)
ForwardStream(ctx context.Context, in *ForwardRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[ForwardChunk], error)
ValidateAccount(ctx context.Context, in *CredentialsRequest, opts ...grpc.CallOption) (*Empty, error)
// WebSocket 双向流
HandleWebSocket(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[WebSocketFrame, WebSocketFrame], error)
}
GatewayServiceClient is the client API for GatewayService 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.
func NewGatewayServiceClient ¶
func NewGatewayServiceClient(cc grpc.ClientConnInterface) GatewayServiceClient
type GatewayServiceServer ¶
type GatewayServiceServer interface {
GetPlatform(context.Context, *Empty) (*StringResponse, error)
GetModels(context.Context, *Empty) (*ModelsResponse, error)
GetRoutes(context.Context, *Empty) (*RoutesResponse, error)
Forward(context.Context, *ForwardRequest) (*ForwardOutcome, error)
ForwardStream(*ForwardRequest, grpc.ServerStreamingServer[ForwardChunk]) error
ValidateAccount(context.Context, *CredentialsRequest) (*Empty, error)
// WebSocket 双向流
HandleWebSocket(grpc.BidiStreamingServer[WebSocketFrame, WebSocketFrame]) error
// contains filtered or unexported methods
}
GatewayServiceServer is the server API for GatewayService service. All implementations must embed UnimplementedGatewayServiceServer for forward compatibility.
type GatewayService_ForwardStreamClient ¶
type GatewayService_ForwardStreamClient = grpc.ServerStreamingClient[ForwardChunk]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type GatewayService_ForwardStreamServer ¶
type GatewayService_ForwardStreamServer = grpc.ServerStreamingServer[ForwardChunk]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type GatewayService_HandleWebSocketClient ¶
type GatewayService_HandleWebSocketClient = grpc.BidiStreamingClient[WebSocketFrame, WebSocketFrame]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type GatewayService_HandleWebSocketServer ¶
type GatewayService_HandleWebSocketServer = grpc.BidiStreamingServer[WebSocketFrame, WebSocketFrame]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type HeaderValues ¶
type HeaderValues struct {
Values []string `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"`
// contains filtered or unexported fields
}
HeaderValues 支持同一 Header 有多个值(如 Set-Cookie)
func (*HeaderValues) Descriptor
deprecated
func (*HeaderValues) Descriptor() ([]byte, []int)
Deprecated: Use HeaderValues.ProtoReflect.Descriptor instead.
func (*HeaderValues) GetValues ¶
func (x *HeaderValues) GetValues() []string
func (*HeaderValues) ProtoMessage ¶
func (*HeaderValues) ProtoMessage()
func (*HeaderValues) ProtoReflect ¶
func (x *HeaderValues) ProtoReflect() protoreflect.Message
func (*HeaderValues) Reset ¶
func (x *HeaderValues) Reset()
func (*HeaderValues) String ¶
func (x *HeaderValues) String() string
type HostInvokeRequest ¶
type HostInvokeRequest struct {
Method string `protobuf:"bytes,1,opt,name=method,proto3" json:"method,omitempty"`
Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` // JSON 编码的对象,由 Core method 自己校验 schema
IdempotencyKey string `protobuf:"bytes,3,opt,name=idempotency_key,json=idempotencyKey,proto3" json:"idempotency_key,omitempty"` // 副作用方法的幂等键;只读方法可留空
Metadata map[string]string `` // 调用级辅助信息,不用于替代权限、调度或核心业务字段
/* 143-byte string literal not displayed */
// contains filtered or unexported fields
}
func (*HostInvokeRequest) Descriptor
deprecated
func (*HostInvokeRequest) Descriptor() ([]byte, []int)
Deprecated: Use HostInvokeRequest.ProtoReflect.Descriptor instead.
func (*HostInvokeRequest) GetIdempotencyKey ¶
func (x *HostInvokeRequest) GetIdempotencyKey() string
func (*HostInvokeRequest) GetMetadata ¶
func (x *HostInvokeRequest) GetMetadata() map[string]string
func (*HostInvokeRequest) GetMethod ¶
func (x *HostInvokeRequest) GetMethod() string
func (*HostInvokeRequest) GetPayload ¶
func (x *HostInvokeRequest) GetPayload() []byte
func (*HostInvokeRequest) ProtoMessage ¶
func (*HostInvokeRequest) ProtoMessage()
func (*HostInvokeRequest) ProtoReflect ¶
func (x *HostInvokeRequest) ProtoReflect() protoreflect.Message
func (*HostInvokeRequest) Reset ¶
func (x *HostInvokeRequest) Reset()
func (*HostInvokeRequest) String ¶
func (x *HostInvokeRequest) String() string
type HostInvokeResponse ¶
type HostInvokeResponse struct {
Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` // method 业务状态;传输/鉴权/schema 错误走 gRPC error
Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` // JSON 编码的对象
Metadata map[string]string `` // 调用级辅助信息
/* 143-byte string literal not displayed */
// contains filtered or unexported fields
}
func (*HostInvokeResponse) Descriptor
deprecated
func (*HostInvokeResponse) Descriptor() ([]byte, []int)
Deprecated: Use HostInvokeResponse.ProtoReflect.Descriptor instead.
func (*HostInvokeResponse) GetMetadata ¶
func (x *HostInvokeResponse) GetMetadata() map[string]string
func (*HostInvokeResponse) GetPayload ¶
func (x *HostInvokeResponse) GetPayload() []byte
func (*HostInvokeResponse) GetStatus ¶
func (x *HostInvokeResponse) GetStatus() string
func (*HostInvokeResponse) ProtoMessage ¶
func (*HostInvokeResponse) ProtoMessage()
func (*HostInvokeResponse) ProtoReflect ¶
func (x *HostInvokeResponse) ProtoReflect() protoreflect.Message
func (*HostInvokeResponse) Reset ¶
func (x *HostInvokeResponse) Reset()
func (*HostInvokeResponse) String ¶
func (x *HostInvokeResponse) String() string
type HostStreamFrame ¶
type HostStreamFrame struct {
Method string `protobuf:"bytes,1,opt,name=method,proto3" json:"method,omitempty"` // 首个 client frame 必填;后续 frame 可留空
Event string `protobuf:"bytes,2,opt,name=event,proto3" json:"event,omitempty"` // method 内部约定的帧类型
Payload []byte `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"` // JSON 编码的对象
IdempotencyKey string `protobuf:"bytes,4,opt,name=idempotency_key,json=idempotencyKey,proto3" json:"idempotency_key,omitempty"` // 首个 client frame 使用
Metadata map[string]string `` // 调用级或帧级辅助信息
/* 143-byte string literal not displayed */
Done bool `protobuf:"varint,6,opt,name=done,proto3" json:"done,omitempty"` // method 业务最终帧;传输结束仍以 stream EOF 为准
Status string `protobuf:"bytes,7,opt,name=status,proto3" json:"status,omitempty"` // method 业务状态,通常只在最终帧使用
// contains filtered or unexported fields
}
func (*HostStreamFrame) Descriptor
deprecated
func (*HostStreamFrame) Descriptor() ([]byte, []int)
Deprecated: Use HostStreamFrame.ProtoReflect.Descriptor instead.
func (*HostStreamFrame) GetDone ¶
func (x *HostStreamFrame) GetDone() bool
func (*HostStreamFrame) GetEvent ¶
func (x *HostStreamFrame) GetEvent() string
func (*HostStreamFrame) GetIdempotencyKey ¶
func (x *HostStreamFrame) GetIdempotencyKey() string
func (*HostStreamFrame) GetMetadata ¶
func (x *HostStreamFrame) GetMetadata() map[string]string
func (*HostStreamFrame) GetMethod ¶
func (x *HostStreamFrame) GetMethod() string
func (*HostStreamFrame) GetPayload ¶
func (x *HostStreamFrame) GetPayload() []byte
func (*HostStreamFrame) GetStatus ¶
func (x *HostStreamFrame) GetStatus() string
func (*HostStreamFrame) ProtoMessage ¶
func (*HostStreamFrame) ProtoMessage()
func (*HostStreamFrame) ProtoReflect ¶
func (x *HostStreamFrame) ProtoReflect() protoreflect.Message
func (*HostStreamFrame) Reset ¶
func (x *HostStreamFrame) Reset()
func (*HostStreamFrame) String ¶
func (x *HostStreamFrame) String() string
type HttpRequest ¶
type HttpRequest struct {
Method string `protobuf:"bytes,1,opt,name=method,proto3" json:"method,omitempty"`
Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"`
Query string `protobuf:"bytes,3,opt,name=query,proto3" json:"query,omitempty"`
Headers map[string]*HeaderValues `` /* 141-byte string literal not displayed */
Body []byte `protobuf:"bytes,5,opt,name=body,proto3" json:"body,omitempty"`
RemoteAddr string `protobuf:"bytes,6,opt,name=remote_addr,json=remoteAddr,proto3" json:"remote_addr,omitempty"`
// contains filtered or unexported fields
}
func (*HttpRequest) Descriptor
deprecated
func (*HttpRequest) Descriptor() ([]byte, []int)
Deprecated: Use HttpRequest.ProtoReflect.Descriptor instead.
func (*HttpRequest) GetBody ¶
func (x *HttpRequest) GetBody() []byte
func (*HttpRequest) GetHeaders ¶
func (x *HttpRequest) GetHeaders() map[string]*HeaderValues
func (*HttpRequest) GetMethod ¶
func (x *HttpRequest) GetMethod() string
func (*HttpRequest) GetPath ¶
func (x *HttpRequest) GetPath() string
func (*HttpRequest) GetQuery ¶
func (x *HttpRequest) GetQuery() string
func (*HttpRequest) GetRemoteAddr ¶
func (x *HttpRequest) GetRemoteAddr() string
func (*HttpRequest) ProtoMessage ¶
func (*HttpRequest) ProtoMessage()
func (*HttpRequest) ProtoReflect ¶
func (x *HttpRequest) ProtoReflect() protoreflect.Message
func (*HttpRequest) Reset ¶
func (x *HttpRequest) Reset()
func (*HttpRequest) String ¶
func (x *HttpRequest) String() string
type HttpResponse ¶
type HttpResponse struct {
StatusCode int32 `protobuf:"varint,1,opt,name=status_code,json=statusCode,proto3" json:"status_code,omitempty"`
Headers map[string]*HeaderValues `` /* 141-byte string literal not displayed */
Body []byte `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"`
// contains filtered or unexported fields
}
func (*HttpResponse) Descriptor
deprecated
func (*HttpResponse) Descriptor() ([]byte, []int)
Deprecated: Use HttpResponse.ProtoReflect.Descriptor instead.
func (*HttpResponse) GetBody ¶
func (x *HttpResponse) GetBody() []byte
func (*HttpResponse) GetHeaders ¶
func (x *HttpResponse) GetHeaders() map[string]*HeaderValues
func (*HttpResponse) GetStatusCode ¶
func (x *HttpResponse) GetStatusCode() int32
func (*HttpResponse) ProtoMessage ¶
func (*HttpResponse) ProtoMessage()
func (*HttpResponse) ProtoReflect ¶
func (x *HttpResponse) ProtoReflect() protoreflect.Message
func (*HttpResponse) Reset ¶
func (x *HttpResponse) Reset()
func (*HttpResponse) String ¶
func (x *HttpResponse) String() string
type HttpResponseChunk ¶
type HttpResponseChunk struct {
Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
Done bool `protobuf:"varint,2,opt,name=done,proto3" json:"done,omitempty"`
StatusCode int32 `protobuf:"varint,3,opt,name=status_code,json=statusCode,proto3" json:"status_code,omitempty"`
Headers map[string]*HeaderValues `` /* 141-byte string literal not displayed */
// contains filtered or unexported fields
}
func (*HttpResponseChunk) Descriptor
deprecated
func (*HttpResponseChunk) Descriptor() ([]byte, []int)
Deprecated: Use HttpResponseChunk.ProtoReflect.Descriptor instead.
func (*HttpResponseChunk) GetData ¶
func (x *HttpResponseChunk) GetData() []byte
func (*HttpResponseChunk) GetDone ¶
func (x *HttpResponseChunk) GetDone() bool
func (*HttpResponseChunk) GetHeaders ¶
func (x *HttpResponseChunk) GetHeaders() map[string]*HeaderValues
func (*HttpResponseChunk) GetStatusCode ¶
func (x *HttpResponseChunk) GetStatusCode() int32
func (*HttpResponseChunk) ProtoMessage ¶
func (*HttpResponseChunk) ProtoMessage()
func (*HttpResponseChunk) ProtoReflect ¶
func (x *HttpResponseChunk) ProtoReflect() protoreflect.Message
func (*HttpResponseChunk) Reset ¶
func (x *HttpResponseChunk) Reset()
func (*HttpResponseChunk) String ¶
func (x *HttpResponseChunk) String() string
type InitRequest ¶
type InitRequest struct {
Config map[string]string `` /* 139-byte string literal not displayed */
LogLevel string `protobuf:"bytes,2,opt,name=log_level,json=logLevel,proto3" json:"log_level,omitempty"`
// core_invoke_broker_id 是 Core 通过 hashicorp/go-plugin GRPCBroker 启动的
// 反向调用 stream ID。插件 Init 时拿到 ID 后,可以通过 broker.Dial(id)
// 拿到 CoreInvokeService grpc client,通过 Invoke / InvokeStream 回调 Core 开放的方法。
// 0 表示 Core 没启用反向调用。
CoreInvokeBrokerId uint32 `protobuf:"varint,3,opt,name=core_invoke_broker_id,json=coreInvokeBrokerId,proto3" json:"core_invoke_broker_id,omitempty"`
// contains filtered or unexported fields
}
func (*InitRequest) Descriptor
deprecated
func (*InitRequest) Descriptor() ([]byte, []int)
Deprecated: Use InitRequest.ProtoReflect.Descriptor instead.
func (*InitRequest) GetConfig ¶
func (x *InitRequest) GetConfig() map[string]string
func (*InitRequest) GetCoreInvokeBrokerId ¶
func (x *InitRequest) GetCoreInvokeBrokerId() uint32
func (*InitRequest) GetLogLevel ¶
func (x *InitRequest) GetLogLevel() string
func (*InitRequest) ProtoMessage ¶
func (*InitRequest) ProtoMessage()
func (*InitRequest) ProtoReflect ¶
func (x *InitRequest) ProtoReflect() protoreflect.Message
func (*InitRequest) Reset ¶
func (x *InitRequest) Reset()
func (*InitRequest) String ¶
func (x *InitRequest) String() string
type InvokeSchemaProto ¶
type InvokeSchemaProto struct {
Method string `protobuf:"bytes,1,opt,name=method,proto3" json:"method,omitempty"`
Summary string `protobuf:"bytes,2,opt,name=summary,proto3" json:"summary,omitempty"`
Request *PayloadSchemaProto `protobuf:"bytes,3,opt,name=request,proto3" json:"request,omitempty"`
Response *PayloadSchemaProto `protobuf:"bytes,4,opt,name=response,proto3" json:"response,omitempty"`
Metadata map[string]string `` /* 143-byte string literal not displayed */
Transport string `protobuf:"bytes,6,opt,name=transport,proto3" json:"transport,omitempty"` // unary / server_stream / client_stream / bidirectional_stream
ClientFrame *PayloadSchemaProto `protobuf:"bytes,7,opt,name=client_frame,json=clientFrame,proto3" json:"client_frame,omitempty"` // InvokeStream client frame payload schema
ServerFrame *PayloadSchemaProto `protobuf:"bytes,8,opt,name=server_frame,json=serverFrame,proto3" json:"server_frame,omitempty"` // InvokeStream server frame payload schema
// contains filtered or unexported fields
}
func (*InvokeSchemaProto) Descriptor
deprecated
func (*InvokeSchemaProto) Descriptor() ([]byte, []int)
Deprecated: Use InvokeSchemaProto.ProtoReflect.Descriptor instead.
func (*InvokeSchemaProto) GetClientFrame ¶
func (x *InvokeSchemaProto) GetClientFrame() *PayloadSchemaProto
func (*InvokeSchemaProto) GetMetadata ¶
func (x *InvokeSchemaProto) GetMetadata() map[string]string
func (*InvokeSchemaProto) GetMethod ¶
func (x *InvokeSchemaProto) GetMethod() string
func (*InvokeSchemaProto) GetRequest ¶
func (x *InvokeSchemaProto) GetRequest() *PayloadSchemaProto
func (*InvokeSchemaProto) GetResponse ¶
func (x *InvokeSchemaProto) GetResponse() *PayloadSchemaProto
func (*InvokeSchemaProto) GetServerFrame ¶
func (x *InvokeSchemaProto) GetServerFrame() *PayloadSchemaProto
func (*InvokeSchemaProto) GetSummary ¶
func (x *InvokeSchemaProto) GetSummary() string
func (*InvokeSchemaProto) GetTransport ¶
func (x *InvokeSchemaProto) GetTransport() string
func (*InvokeSchemaProto) ProtoMessage ¶
func (*InvokeSchemaProto) ProtoMessage()
func (*InvokeSchemaProto) ProtoReflect ¶
func (x *InvokeSchemaProto) ProtoReflect() protoreflect.Message
func (*InvokeSchemaProto) Reset ¶
func (x *InvokeSchemaProto) Reset()
func (*InvokeSchemaProto) String ¶
func (x *InvokeSchemaProto) String() string
type MiddlewareDecision ¶
type MiddlewareDecision struct {
Action MiddlewareDecision_Action `protobuf:"varint,1,opt,name=action,proto3,enum=airgate.plugin.v1.MiddlewareDecision_Action" json:"action,omitempty"`
// action=DENY 时的错误码 / 文案(对用户可见)
DenyStatusCode int32 `protobuf:"varint,10,opt,name=deny_status_code,json=denyStatusCode,proto3" json:"deny_status_code,omitempty"` // 默认 403 if Action=DENY and 未指定
DenyMessage string `protobuf:"bytes,11,opt,name=deny_message,json=denyMessage,proto3" json:"deny_message,omitempty"`
// action=MUTATE 时要追加/覆盖的请求头
SetHeaders map[string]*HeaderValues `` /* 166-byte string literal not displayed */
// 贯穿式 metadata:无论 allow/deny/mutate,都能往 bag 里写东西供后续 middleware / End 使用
Metadata map[string]string `` /* 144-byte string literal not displayed */
// contains filtered or unexported fields
}
MiddlewareDecision OnForwardBegin 的输出:放行 / 拒绝 / 改请求。
func (*MiddlewareDecision) Descriptor
deprecated
func (*MiddlewareDecision) Descriptor() ([]byte, []int)
Deprecated: Use MiddlewareDecision.ProtoReflect.Descriptor instead.
func (*MiddlewareDecision) GetAction ¶
func (x *MiddlewareDecision) GetAction() MiddlewareDecision_Action
func (*MiddlewareDecision) GetDenyMessage ¶
func (x *MiddlewareDecision) GetDenyMessage() string
func (*MiddlewareDecision) GetDenyStatusCode ¶
func (x *MiddlewareDecision) GetDenyStatusCode() int32
func (*MiddlewareDecision) GetMetadata ¶
func (x *MiddlewareDecision) GetMetadata() map[string]string
func (*MiddlewareDecision) GetSetHeaders ¶
func (x *MiddlewareDecision) GetSetHeaders() map[string]*HeaderValues
func (*MiddlewareDecision) ProtoMessage ¶
func (*MiddlewareDecision) ProtoMessage()
func (*MiddlewareDecision) ProtoReflect ¶
func (x *MiddlewareDecision) ProtoReflect() protoreflect.Message
func (*MiddlewareDecision) Reset ¶
func (x *MiddlewareDecision) Reset()
func (*MiddlewareDecision) String ¶
func (x *MiddlewareDecision) String() string
type MiddlewareDecision_Action ¶
type MiddlewareDecision_Action int32
const ( MiddlewareDecision_ALLOW MiddlewareDecision_Action = 0 // 默认放行 MiddlewareDecision_DENY MiddlewareDecision_Action = 1 // 拒绝请求,status_code + error_message 会直接返回给用户 MiddlewareDecision_MUTATE MiddlewareDecision_Action = 2 // 放行但修改请求(当前只支持 set_headers) )
func (MiddlewareDecision_Action) Descriptor ¶
func (MiddlewareDecision_Action) Descriptor() protoreflect.EnumDescriptor
func (MiddlewareDecision_Action) Enum ¶
func (x MiddlewareDecision_Action) Enum() *MiddlewareDecision_Action
func (MiddlewareDecision_Action) EnumDescriptor
deprecated
func (MiddlewareDecision_Action) EnumDescriptor() ([]byte, []int)
Deprecated: Use MiddlewareDecision_Action.Descriptor instead.
func (MiddlewareDecision_Action) Number ¶
func (x MiddlewareDecision_Action) Number() protoreflect.EnumNumber
func (MiddlewareDecision_Action) String ¶
func (x MiddlewareDecision_Action) String() string
func (MiddlewareDecision_Action) Type ¶
func (MiddlewareDecision_Action) Type() protoreflect.EnumType
type MiddlewareEvent ¶
type MiddlewareEvent struct {
// === 核心元数据(与 MiddlewareRequest 对齐)===
RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
UserId int64 `protobuf:"varint,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
GroupId int64 `protobuf:"varint,3,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"`
AccountId int64 `protobuf:"varint,4,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"`
Platform string `protobuf:"bytes,5,opt,name=platform,proto3" json:"platform,omitempty"`
Model string `protobuf:"bytes,6,opt,name=model,proto3" json:"model,omitempty"`
Stream bool `protobuf:"varint,7,opt,name=stream,proto3" json:"stream,omitempty"`
// === 响应结果 ===
StatusCode int64 `protobuf:"varint,20,opt,name=status_code,json=statusCode,proto3" json:"status_code,omitempty"`
DurationMs int64 `protobuf:"varint,21,opt,name=duration_ms,json=durationMs,proto3" json:"duration_ms,omitempty"`
Usage *Usage `protobuf:"bytes,22,opt,name=usage,proto3" json:"usage,omitempty"`
ErrorKind string `protobuf:"bytes,23,opt,name=error_kind,json=errorKind,proto3" json:"error_kind,omitempty"` // "" / "upstream_5xx" / "timeout" / "no_account" / ...
ErrorMsg string `protobuf:"bytes,24,opt,name=error_msg,json=errorMsg,proto3" json:"error_msg,omitempty"` // 限长 512,见 core 实现
// metadata 延续自 OnForwardBegin 的 bag
Metadata map[string]string `` /* 144-byte string literal not displayed */
// === 按需字段(声明了 middleware.read_body capability 的插件才会收到)===
// 流式响应时 response_body 只给摘要(首次非空 chunk 拼装)。
ResponseBody []byte `protobuf:"bytes,100,opt,name=response_body,json=responseBody,proto3" json:"response_body,omitempty"`
ResponseHeaders map[string]*HeaderValues `` /* 182-byte string literal not displayed */
// contains filtered or unexported fields
}
MiddlewareEvent OnForwardEnd 的输入:完整的请求 + 响应元数据。
func (*MiddlewareEvent) Descriptor
deprecated
func (*MiddlewareEvent) Descriptor() ([]byte, []int)
Deprecated: Use MiddlewareEvent.ProtoReflect.Descriptor instead.
func (*MiddlewareEvent) GetAccountId ¶
func (x *MiddlewareEvent) GetAccountId() int64
func (*MiddlewareEvent) GetDurationMs ¶
func (x *MiddlewareEvent) GetDurationMs() int64
func (*MiddlewareEvent) GetErrorKind ¶
func (x *MiddlewareEvent) GetErrorKind() string
func (*MiddlewareEvent) GetErrorMsg ¶
func (x *MiddlewareEvent) GetErrorMsg() string
func (*MiddlewareEvent) GetGroupId ¶
func (x *MiddlewareEvent) GetGroupId() int64
func (*MiddlewareEvent) GetMetadata ¶
func (x *MiddlewareEvent) GetMetadata() map[string]string
func (*MiddlewareEvent) GetModel ¶
func (x *MiddlewareEvent) GetModel() string
func (*MiddlewareEvent) GetPlatform ¶
func (x *MiddlewareEvent) GetPlatform() string
func (*MiddlewareEvent) GetRequestId ¶
func (x *MiddlewareEvent) GetRequestId() string
func (*MiddlewareEvent) GetResponseBody ¶
func (x *MiddlewareEvent) GetResponseBody() []byte
func (*MiddlewareEvent) GetResponseHeaders ¶
func (x *MiddlewareEvent) GetResponseHeaders() map[string]*HeaderValues
func (*MiddlewareEvent) GetStatusCode ¶
func (x *MiddlewareEvent) GetStatusCode() int64
func (*MiddlewareEvent) GetStream ¶
func (x *MiddlewareEvent) GetStream() bool
func (*MiddlewareEvent) GetUsage ¶
func (x *MiddlewareEvent) GetUsage() *Usage
func (*MiddlewareEvent) GetUserId ¶
func (x *MiddlewareEvent) GetUserId() int64
func (*MiddlewareEvent) ProtoMessage ¶
func (*MiddlewareEvent) ProtoMessage()
func (*MiddlewareEvent) ProtoReflect ¶
func (x *MiddlewareEvent) ProtoReflect() protoreflect.Message
func (*MiddlewareEvent) Reset ¶
func (x *MiddlewareEvent) Reset()
func (*MiddlewareEvent) String ¶
func (x *MiddlewareEvent) String() string
type MiddlewareRequest ¶
type MiddlewareRequest struct {
// === 核心元数据(默认总是填充)===
RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` // core 为本次请求分配的唯一 ID(便于跨 Begin/End 关联)
UserId int64 `protobuf:"varint,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
GroupId int64 `protobuf:"varint,3,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"`
AccountId int64 `protobuf:"varint,4,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` // 已由 scheduler 选出
Platform string `protobuf:"bytes,5,opt,name=platform,proto3" json:"platform,omitempty"`
Model string `protobuf:"bytes,6,opt,name=model,proto3" json:"model,omitempty"`
Stream bool `protobuf:"varint,7,opt,name=stream,proto3" json:"stream,omitempty"`
// metadata KV bag:供多个 middleware 之间传递上下文。
// 命名空间规则由 Core 管理,插件不应依赖未声明的敏感字段。
Metadata map[string]string `` /* 143-byte string literal not displayed */
// === 按需字段(声明了 middleware.read_body capability 的插件才会收到)===
RequestBody []byte `protobuf:"bytes,100,opt,name=request_body,json=requestBody,proto3" json:"request_body,omitempty"`
RequestHeaders map[string]*HeaderValues `` /* 179-byte string literal not displayed */
// contains filtered or unexported fields
}
MiddlewareRequest OnForwardBegin 的输入:请求元数据 + 可选的 request body。
func (*MiddlewareRequest) Descriptor
deprecated
func (*MiddlewareRequest) Descriptor() ([]byte, []int)
Deprecated: Use MiddlewareRequest.ProtoReflect.Descriptor instead.
func (*MiddlewareRequest) GetAccountId ¶
func (x *MiddlewareRequest) GetAccountId() int64
func (*MiddlewareRequest) GetGroupId ¶
func (x *MiddlewareRequest) GetGroupId() int64
func (*MiddlewareRequest) GetMetadata ¶
func (x *MiddlewareRequest) GetMetadata() map[string]string
func (*MiddlewareRequest) GetModel ¶
func (x *MiddlewareRequest) GetModel() string
func (*MiddlewareRequest) GetPlatform ¶
func (x *MiddlewareRequest) GetPlatform() string
func (*MiddlewareRequest) GetRequestBody ¶
func (x *MiddlewareRequest) GetRequestBody() []byte
func (*MiddlewareRequest) GetRequestHeaders ¶
func (x *MiddlewareRequest) GetRequestHeaders() map[string]*HeaderValues
func (*MiddlewareRequest) GetRequestId ¶
func (x *MiddlewareRequest) GetRequestId() string
func (*MiddlewareRequest) GetStream ¶
func (x *MiddlewareRequest) GetStream() bool
func (*MiddlewareRequest) GetUserId ¶
func (x *MiddlewareRequest) GetUserId() int64
func (*MiddlewareRequest) ProtoMessage ¶
func (*MiddlewareRequest) ProtoMessage()
func (*MiddlewareRequest) ProtoReflect ¶
func (x *MiddlewareRequest) ProtoReflect() protoreflect.Message
func (*MiddlewareRequest) Reset ¶
func (x *MiddlewareRequest) Reset()
func (*MiddlewareRequest) String ¶
func (x *MiddlewareRequest) String() string
type MiddlewareServiceClient ¶
type MiddlewareServiceClient interface {
OnForwardBegin(ctx context.Context, in *MiddlewareRequest, opts ...grpc.CallOption) (*MiddlewareDecision, error)
OnForwardEnd(ctx context.Context, in *MiddlewareEvent, opts ...grpc.CallOption) (*Empty, error)
}
MiddlewareServiceClient is the client API for MiddlewareService 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.
==================== 中间件服务(Core → Plugin,forward 路径拦截) ====================
MiddlewareService 让"请求中间层"这种旁路插件能拿到每次 forward 的前后事件:
- OnForwardBegin — 选完账号 / 还没调 upstream 之前,能改 headers / 拒绝请求
- OnForwardEnd — upstream 返回之后 / 写 usage_log 之前,拿到完整 metadata
设计原则:
- middleware 挂了不能 block 生产:返回 error 只 log warn,流程继续; 只有 OnForwardBegin 明确返回 Action=DENY 才会拒绝请求
- 多个 middleware 按 priority 排序。Begin 升序、End 降序(LIFO)
- payload 两段式:默认只传元数据,声明 middleware.read_body capability 的插件 才会收到 request_body / response_body
- 流式响应的 response_body 只给摘要(首次非空 chunk 拼装),完整流式内容应由 独立的流式事件能力承载
新角色:middleware 插件不是 gateway(不替代 upstream),也不是 extension (不跑后台任务 + 自定义 HTTP)。它在 PluginInfo.type = "middleware" 中声明。
func NewMiddlewareServiceClient ¶
func NewMiddlewareServiceClient(cc grpc.ClientConnInterface) MiddlewareServiceClient
type MiddlewareServiceServer ¶
type MiddlewareServiceServer interface {
OnForwardBegin(context.Context, *MiddlewareRequest) (*MiddlewareDecision, error)
OnForwardEnd(context.Context, *MiddlewareEvent) (*Empty, error)
// contains filtered or unexported methods
}
MiddlewareServiceServer is the server API for MiddlewareService service. All implementations must embed UnimplementedMiddlewareServiceServer for forward compatibility.
==================== 中间件服务(Core → Plugin,forward 路径拦截) ====================
MiddlewareService 让"请求中间层"这种旁路插件能拿到每次 forward 的前后事件:
- OnForwardBegin — 选完账号 / 还没调 upstream 之前,能改 headers / 拒绝请求
- OnForwardEnd — upstream 返回之后 / 写 usage_log 之前,拿到完整 metadata
设计原则:
- middleware 挂了不能 block 生产:返回 error 只 log warn,流程继续; 只有 OnForwardBegin 明确返回 Action=DENY 才会拒绝请求
- 多个 middleware 按 priority 排序。Begin 升序、End 降序(LIFO)
- payload 两段式:默认只传元数据,声明 middleware.read_body capability 的插件 才会收到 request_body / response_body
- 流式响应的 response_body 只给摘要(首次非空 chunk 拼装),完整流式内容应由 独立的流式事件能力承载
新角色:middleware 插件不是 gateway(不替代 upstream),也不是 extension (不跑后台任务 + 自定义 HTTP)。它在 PluginInfo.type = "middleware" 中声明。
type ModelInfoProto ¶
type ModelInfoProto struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
ContextWindow int64 `protobuf:"varint,3,opt,name=context_window,json=contextWindow,proto3" json:"context_window,omitempty"`
MaxOutputTokens int64 `protobuf:"varint,4,opt,name=max_output_tokens,json=maxOutputTokens,proto3" json:"max_output_tokens,omitempty"`
Capabilities []string `protobuf:"bytes,5,rep,name=capabilities,proto3" json:"capabilities,omitempty"`
Metadata map[string]string `` /* 143-byte string literal not displayed */
// contains filtered or unexported fields
}
func (*ModelInfoProto) Descriptor
deprecated
func (*ModelInfoProto) Descriptor() ([]byte, []int)
Deprecated: Use ModelInfoProto.ProtoReflect.Descriptor instead.
func (*ModelInfoProto) GetCapabilities ¶
func (x *ModelInfoProto) GetCapabilities() []string
func (*ModelInfoProto) GetContextWindow ¶
func (x *ModelInfoProto) GetContextWindow() int64
func (*ModelInfoProto) GetId ¶
func (x *ModelInfoProto) GetId() string
func (*ModelInfoProto) GetMaxOutputTokens ¶
func (x *ModelInfoProto) GetMaxOutputTokens() int64
func (*ModelInfoProto) GetMetadata ¶
func (x *ModelInfoProto) GetMetadata() map[string]string
func (*ModelInfoProto) GetName ¶
func (x *ModelInfoProto) GetName() string
func (*ModelInfoProto) ProtoMessage ¶
func (*ModelInfoProto) ProtoMessage()
func (*ModelInfoProto) ProtoReflect ¶
func (x *ModelInfoProto) ProtoReflect() protoreflect.Message
func (*ModelInfoProto) Reset ¶
func (x *ModelInfoProto) Reset()
func (*ModelInfoProto) String ¶
func (x *ModelInfoProto) String() string
type ModelsResponse ¶
type ModelsResponse struct {
Models []*ModelInfoProto `protobuf:"bytes,1,rep,name=models,proto3" json:"models,omitempty"`
// contains filtered or unexported fields
}
func (*ModelsResponse) Descriptor
deprecated
func (*ModelsResponse) Descriptor() ([]byte, []int)
Deprecated: Use ModelsResponse.ProtoReflect.Descriptor instead.
func (*ModelsResponse) GetModels ¶
func (x *ModelsResponse) GetModels() []*ModelInfoProto
func (*ModelsResponse) ProtoMessage ¶
func (*ModelsResponse) ProtoMessage()
func (*ModelsResponse) ProtoReflect ¶
func (x *ModelsResponse) ProtoReflect() protoreflect.Message
func (*ModelsResponse) Reset ¶
func (x *ModelsResponse) Reset()
func (*ModelsResponse) String ¶
func (x *ModelsResponse) String() string
type OutcomeKind ¶
type OutcomeKind int32
OutcomeKind 插件对一次 Forward 的判决。 字段值与 sdk.OutcomeKind 常量一一对应;0 = UNKNOWN(插件未声明)。
const ( OutcomeKind_OUTCOME_UNKNOWN OutcomeKind = 0 OutcomeKind_OUTCOME_SUCCESS OutcomeKind = 1 OutcomeKind_OUTCOME_CLIENT_ERROR OutcomeKind = 2 OutcomeKind_OUTCOME_ACCOUNT_RATE_LIMITED OutcomeKind = 3 OutcomeKind_OUTCOME_ACCOUNT_DEAD OutcomeKind = 4 OutcomeKind_OUTCOME_UPSTREAM_TRANSIENT OutcomeKind = 5 OutcomeKind_OUTCOME_STREAM_ABORTED OutcomeKind = 6 OutcomeKind_OUTCOME_ACCOUNT_MODEL_UNSUPPORTED OutcomeKind = 7 OutcomeKind_OUTCOME_ACCOUNT_UNAVAILABLE OutcomeKind = 8 )
func (OutcomeKind) Descriptor ¶
func (OutcomeKind) Descriptor() protoreflect.EnumDescriptor
func (OutcomeKind) Enum ¶
func (x OutcomeKind) Enum() *OutcomeKind
func (OutcomeKind) EnumDescriptor
deprecated
func (OutcomeKind) EnumDescriptor() ([]byte, []int)
Deprecated: Use OutcomeKind.Descriptor instead.
func (OutcomeKind) Number ¶
func (x OutcomeKind) Number() protoreflect.EnumNumber
func (OutcomeKind) String ¶
func (x OutcomeKind) String() string
func (OutcomeKind) Type ¶
func (OutcomeKind) Type() protoreflect.EnumType
type PayloadSchemaProto ¶
type PayloadSchemaProto struct {
ContentType string `protobuf:"bytes,1,opt,name=content_type,json=contentType,proto3" json:"content_type,omitempty"`
Schema string `protobuf:"bytes,2,opt,name=schema,proto3" json:"schema,omitempty"` // JSON Schema 字符串
Example string `protobuf:"bytes,3,opt,name=example,proto3" json:"example,omitempty"` // JSON 示例字符串
Metadata map[string]string `` /* 143-byte string literal not displayed */
// contains filtered or unexported fields
}
func (*PayloadSchemaProto) Descriptor
deprecated
func (*PayloadSchemaProto) Descriptor() ([]byte, []int)
Deprecated: Use PayloadSchemaProto.ProtoReflect.Descriptor instead.
func (*PayloadSchemaProto) GetContentType ¶
func (x *PayloadSchemaProto) GetContentType() string
func (*PayloadSchemaProto) GetExample ¶
func (x *PayloadSchemaProto) GetExample() string
func (*PayloadSchemaProto) GetMetadata ¶
func (x *PayloadSchemaProto) GetMetadata() map[string]string
func (*PayloadSchemaProto) GetSchema ¶
func (x *PayloadSchemaProto) GetSchema() string
func (*PayloadSchemaProto) ProtoMessage ¶
func (*PayloadSchemaProto) ProtoMessage()
func (*PayloadSchemaProto) ProtoReflect ¶
func (x *PayloadSchemaProto) ProtoReflect() protoreflect.Message
func (*PayloadSchemaProto) Reset ¶
func (x *PayloadSchemaProto) Reset()
func (*PayloadSchemaProto) String ¶
func (x *PayloadSchemaProto) String() string
type PluginEvent ¶
type PluginEvent struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
Source string `protobuf:"bytes,3,opt,name=source,proto3" json:"source,omitempty"`
Subject string `protobuf:"bytes,4,opt,name=subject,proto3" json:"subject,omitempty"`
UserId int64 `protobuf:"varint,5,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
GroupId int64 `protobuf:"varint,6,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"`
Payload []byte `protobuf:"bytes,7,opt,name=payload,proto3" json:"payload,omitempty"` // JSON 编码的对象
Metadata map[string]string `` /* 143-byte string literal not displayed */
OccurredAt int64 `protobuf:"varint,9,opt,name=occurred_at,json=occurredAt,proto3" json:"occurred_at,omitempty"` // unix millis, 0 = unset
// contains filtered or unexported fields
}
func (*PluginEvent) Descriptor
deprecated
func (*PluginEvent) Descriptor() ([]byte, []int)
Deprecated: Use PluginEvent.ProtoReflect.Descriptor instead.
func (*PluginEvent) GetGroupId ¶
func (x *PluginEvent) GetGroupId() int64
func (*PluginEvent) GetId ¶
func (x *PluginEvent) GetId() string
func (*PluginEvent) GetMetadata ¶
func (x *PluginEvent) GetMetadata() map[string]string
func (*PluginEvent) GetOccurredAt ¶
func (x *PluginEvent) GetOccurredAt() int64
func (*PluginEvent) GetPayload ¶
func (x *PluginEvent) GetPayload() []byte
func (*PluginEvent) GetSource ¶
func (x *PluginEvent) GetSource() string
func (*PluginEvent) GetSubject ¶
func (x *PluginEvent) GetSubject() string
func (*PluginEvent) GetType ¶
func (x *PluginEvent) GetType() string
func (*PluginEvent) GetUserId ¶
func (x *PluginEvent) GetUserId() int64
func (*PluginEvent) ProtoMessage ¶
func (*PluginEvent) ProtoMessage()
func (*PluginEvent) ProtoReflect ¶
func (x *PluginEvent) ProtoReflect() protoreflect.Message
func (*PluginEvent) Reset ¶
func (x *PluginEvent) Reset()
func (*PluginEvent) String ¶
func (x *PluginEvent) String() string
type PluginInfoResponse ¶
type PluginInfoResponse struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"`
Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
Author string `protobuf:"bytes,5,opt,name=author,proto3" json:"author,omitempty"`
Type string `protobuf:"bytes,6,opt,name=type,proto3" json:"type,omitempty"`
AccountTypes []*AccountTypeProto `protobuf:"bytes,7,rep,name=account_types,json=accountTypes,proto3" json:"account_types,omitempty"`
FrontendPages []*FrontendPageProto `protobuf:"bytes,8,rep,name=frontend_pages,json=frontendPages,proto3" json:"frontend_pages,omitempty"`
FrontendWidgets []*FrontendWidgetProto `protobuf:"bytes,9,rep,name=frontend_widgets,json=frontendWidgets,proto3" json:"frontend_widgets,omitempty"`
SdkVersion string `protobuf:"bytes,10,opt,name=sdk_version,json=sdkVersion,proto3" json:"sdk_version,omitempty"` // 插件编译时的 SDK 版本
Dependencies []string `protobuf:"bytes,11,rep,name=dependencies,proto3" json:"dependencies,omitempty"` // 依赖的其他插件 ID
ConfigSchema []*ConfigFieldProto `protobuf:"bytes,12,rep,name=config_schema,json=configSchema,proto3" json:"config_schema,omitempty"` // 配置项声明
InstructionPresets []string `protobuf:"bytes,13,rep,name=instruction_presets,json=instructionPresets,proto3" json:"instruction_presets,omitempty"` // 可用的 instructions 预设名称列表
// capabilities 声明 Host.Invoke / Host.InvokeStream、method 级授权和 Middleware 能力。
// Core 启动时按插件类型、方法注册表和 RPC 调用做准入校验。
Capabilities []string `protobuf:"bytes,14,rep,name=capabilities,proto3" json:"capabilities,omitempty"`
// priority 中间件链中的排序权重(数值越小越早进 Begin、越晚出 End)。
// 仅 type="middleware" 插件使用;其他类型忽略。默认 100。
Priority int32 `protobuf:"varint,15,opt,name=priority,proto3" json:"priority,omitempty"`
// metadata 保存插件声明层面的弱契约扩展信息,例如分类、市场标签、展示提示。
// 需要 Core 授权或参与调度的数据必须进入显式字段或 capability。
Metadata map[string]string `` /* 144-byte string literal not displayed */
// dispatch_dsl 是插件默认的请求调度规则。Core 可在 group 级覆盖或追加。
DispatchDsl *DispatchDSLProto `protobuf:"bytes,17,opt,name=dispatch_dsl,json=dispatchDsl,proto3" json:"dispatch_dsl,omitempty"`
// contains filtered or unexported fields
}
func (*PluginInfoResponse) Descriptor
deprecated
func (*PluginInfoResponse) Descriptor() ([]byte, []int)
Deprecated: Use PluginInfoResponse.ProtoReflect.Descriptor instead.
func (*PluginInfoResponse) GetAccountTypes ¶
func (x *PluginInfoResponse) GetAccountTypes() []*AccountTypeProto
func (*PluginInfoResponse) GetAuthor ¶
func (x *PluginInfoResponse) GetAuthor() string
func (*PluginInfoResponse) GetCapabilities ¶
func (x *PluginInfoResponse) GetCapabilities() []string
func (*PluginInfoResponse) GetConfigSchema ¶
func (x *PluginInfoResponse) GetConfigSchema() []*ConfigFieldProto
func (*PluginInfoResponse) GetDependencies ¶
func (x *PluginInfoResponse) GetDependencies() []string
func (*PluginInfoResponse) GetDescription ¶
func (x *PluginInfoResponse) GetDescription() string
func (*PluginInfoResponse) GetDispatchDsl ¶ added in v0.2.3
func (x *PluginInfoResponse) GetDispatchDsl() *DispatchDSLProto
func (*PluginInfoResponse) GetFrontendPages ¶
func (x *PluginInfoResponse) GetFrontendPages() []*FrontendPageProto
func (*PluginInfoResponse) GetFrontendWidgets ¶
func (x *PluginInfoResponse) GetFrontendWidgets() []*FrontendWidgetProto
func (*PluginInfoResponse) GetId ¶
func (x *PluginInfoResponse) GetId() string
func (*PluginInfoResponse) GetInstructionPresets ¶
func (x *PluginInfoResponse) GetInstructionPresets() []string
func (*PluginInfoResponse) GetMetadata ¶
func (x *PluginInfoResponse) GetMetadata() map[string]string
func (*PluginInfoResponse) GetName ¶
func (x *PluginInfoResponse) GetName() string
func (*PluginInfoResponse) GetPriority ¶
func (x *PluginInfoResponse) GetPriority() int32
func (*PluginInfoResponse) GetSdkVersion ¶
func (x *PluginInfoResponse) GetSdkVersion() string
func (*PluginInfoResponse) GetType ¶
func (x *PluginInfoResponse) GetType() string
func (*PluginInfoResponse) GetVersion ¶
func (x *PluginInfoResponse) GetVersion() string
func (*PluginInfoResponse) ProtoMessage ¶
func (*PluginInfoResponse) ProtoMessage()
func (*PluginInfoResponse) ProtoReflect ¶
func (x *PluginInfoResponse) ProtoReflect() protoreflect.Message
func (*PluginInfoResponse) Reset ¶
func (x *PluginInfoResponse) Reset()
func (*PluginInfoResponse) String ¶
func (x *PluginInfoResponse) String() string
type PluginSchemaResponse ¶
type PluginSchemaResponse struct {
Routes []*RouteSchemaProto `protobuf:"bytes,1,rep,name=routes,proto3" json:"routes,omitempty"`
Tasks []*TaskSchemaProto `protobuf:"bytes,2,rep,name=tasks,proto3" json:"tasks,omitempty"`
Events []*EventSchemaProto `protobuf:"bytes,3,rep,name=events,proto3" json:"events,omitempty"`
Invokes []*InvokeSchemaProto `protobuf:"bytes,4,rep,name=invokes,proto3" json:"invokes,omitempty"`
Metadata map[string]string `` /* 143-byte string literal not displayed */
// contains filtered or unexported fields
}
func (*PluginSchemaResponse) Descriptor
deprecated
func (*PluginSchemaResponse) Descriptor() ([]byte, []int)
Deprecated: Use PluginSchemaResponse.ProtoReflect.Descriptor instead.
func (*PluginSchemaResponse) GetEvents ¶
func (x *PluginSchemaResponse) GetEvents() []*EventSchemaProto
func (*PluginSchemaResponse) GetInvokes ¶
func (x *PluginSchemaResponse) GetInvokes() []*InvokeSchemaProto
func (*PluginSchemaResponse) GetMetadata ¶
func (x *PluginSchemaResponse) GetMetadata() map[string]string
func (*PluginSchemaResponse) GetRoutes ¶
func (x *PluginSchemaResponse) GetRoutes() []*RouteSchemaProto
func (*PluginSchemaResponse) GetTasks ¶
func (x *PluginSchemaResponse) GetTasks() []*TaskSchemaProto
func (*PluginSchemaResponse) ProtoMessage ¶
func (*PluginSchemaResponse) ProtoMessage()
func (*PluginSchemaResponse) ProtoReflect ¶
func (x *PluginSchemaResponse) ProtoReflect() protoreflect.Message
func (*PluginSchemaResponse) Reset ¶
func (x *PluginSchemaResponse) Reset()
func (*PluginSchemaResponse) String ¶
func (x *PluginSchemaResponse) String() string
type PluginServiceClient ¶
type PluginServiceClient interface {
GetInfo(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*PluginInfoResponse, error)
Init(ctx context.Context, in *InitRequest, opts ...grpc.CallOption) (*Empty, error)
Start(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error)
Stop(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error)
// 获取插件的前端静态资源
GetWebAssets(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*WebAssetsResponse, error)
// 获取插件结构化能力清单(可选,未实现时返回空)
GetSchema(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*PluginSchemaResponse, error)
// 健康检查(可选,插件未实现时返回成功)
HealthCheck(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error)
// 通用请求代理:Core 透传,插件自行路由(可选,插件未实现时返回 501)
HandleRequest(ctx context.Context, in *HttpRequest, opts ...grpc.CallOption) (*HttpResponse, error)
}
PluginServiceClient is the client API for PluginService 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.
func NewPluginServiceClient ¶
func NewPluginServiceClient(cc grpc.ClientConnInterface) PluginServiceClient
type PluginServiceServer ¶
type PluginServiceServer interface {
GetInfo(context.Context, *Empty) (*PluginInfoResponse, error)
Init(context.Context, *InitRequest) (*Empty, error)
Start(context.Context, *Empty) (*Empty, error)
Stop(context.Context, *Empty) (*Empty, error)
// 获取插件的前端静态资源
GetWebAssets(context.Context, *Empty) (*WebAssetsResponse, error)
// 获取插件结构化能力清单(可选,未实现时返回空)
GetSchema(context.Context, *Empty) (*PluginSchemaResponse, error)
// 健康检查(可选,插件未实现时返回成功)
HealthCheck(context.Context, *Empty) (*Empty, error)
// 通用请求代理:Core 透传,插件自行路由(可选,插件未实现时返回 501)
HandleRequest(context.Context, *HttpRequest) (*HttpResponse, error)
// contains filtered or unexported methods
}
PluginServiceServer is the server API for PluginService service. All implementations must embed UnimplementedPluginServiceServer for forward compatibility.
type ProcessTaskRequest ¶
type ProcessTaskRequest struct {
TaskId int64 `protobuf:"varint,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"`
TaskType string `protobuf:"bytes,2,opt,name=task_type,json=taskType,proto3" json:"task_type,omitempty"`
Input []byte `protobuf:"bytes,3,opt,name=input,proto3" json:"input,omitempty"` // JSON
UserId int64 `protobuf:"varint,4,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
// contains filtered or unexported fields
}
func (*ProcessTaskRequest) Descriptor
deprecated
func (*ProcessTaskRequest) Descriptor() ([]byte, []int)
Deprecated: Use ProcessTaskRequest.ProtoReflect.Descriptor instead.
func (*ProcessTaskRequest) GetInput ¶
func (x *ProcessTaskRequest) GetInput() []byte
func (*ProcessTaskRequest) GetTaskId ¶
func (x *ProcessTaskRequest) GetTaskId() int64
func (*ProcessTaskRequest) GetTaskType ¶
func (x *ProcessTaskRequest) GetTaskType() string
func (*ProcessTaskRequest) GetUserId ¶
func (x *ProcessTaskRequest) GetUserId() int64
func (*ProcessTaskRequest) ProtoMessage ¶
func (*ProcessTaskRequest) ProtoMessage()
func (*ProcessTaskRequest) ProtoReflect ¶
func (x *ProcessTaskRequest) ProtoReflect() protoreflect.Message
func (*ProcessTaskRequest) Reset ¶
func (x *ProcessTaskRequest) Reset()
func (*ProcessTaskRequest) String ¶
func (x *ProcessTaskRequest) String() string
type ProcessTaskResponse ¶
type ProcessTaskResponse struct {
Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
ErrorMessage string `protobuf:"bytes,2,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"`
// contains filtered or unexported fields
}
func (*ProcessTaskResponse) Descriptor
deprecated
func (*ProcessTaskResponse) Descriptor() ([]byte, []int)
Deprecated: Use ProcessTaskResponse.ProtoReflect.Descriptor instead.
func (*ProcessTaskResponse) GetErrorMessage ¶
func (x *ProcessTaskResponse) GetErrorMessage() string
func (*ProcessTaskResponse) GetSuccess ¶
func (x *ProcessTaskResponse) GetSuccess() bool
func (*ProcessTaskResponse) ProtoMessage ¶
func (*ProcessTaskResponse) ProtoMessage()
func (*ProcessTaskResponse) ProtoReflect ¶
func (x *ProcessTaskResponse) ProtoReflect() protoreflect.Message
func (*ProcessTaskResponse) Reset ¶
func (x *ProcessTaskResponse) Reset()
func (*ProcessTaskResponse) String ¶
func (x *ProcessTaskResponse) String() string
type RouteDefinitionProto ¶
type RouteDefinitionProto struct {
Method string `protobuf:"bytes,1,opt,name=method,proto3" json:"method,omitempty"`
Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"`
Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
Metadata map[string]string `` /* 143-byte string literal not displayed */
// contains filtered or unexported fields
}
func (*RouteDefinitionProto) Descriptor
deprecated
func (*RouteDefinitionProto) Descriptor() ([]byte, []int)
Deprecated: Use RouteDefinitionProto.ProtoReflect.Descriptor instead.
func (*RouteDefinitionProto) GetDescription ¶
func (x *RouteDefinitionProto) GetDescription() string
func (*RouteDefinitionProto) GetMetadata ¶
func (x *RouteDefinitionProto) GetMetadata() map[string]string
func (*RouteDefinitionProto) GetMethod ¶
func (x *RouteDefinitionProto) GetMethod() string
func (*RouteDefinitionProto) GetPath ¶
func (x *RouteDefinitionProto) GetPath() string
func (*RouteDefinitionProto) ProtoMessage ¶
func (*RouteDefinitionProto) ProtoMessage()
func (*RouteDefinitionProto) ProtoReflect ¶
func (x *RouteDefinitionProto) ProtoReflect() protoreflect.Message
func (*RouteDefinitionProto) Reset ¶
func (x *RouteDefinitionProto) Reset()
func (*RouteDefinitionProto) String ¶
func (x *RouteDefinitionProto) String() string
type RouteSchemaProto ¶
type RouteSchemaProto struct {
Method string `protobuf:"bytes,1,opt,name=method,proto3" json:"method,omitempty"`
Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"`
Summary string `protobuf:"bytes,3,opt,name=summary,proto3" json:"summary,omitempty"`
Request *PayloadSchemaProto `protobuf:"bytes,4,opt,name=request,proto3" json:"request,omitempty"`
Response *PayloadSchemaProto `protobuf:"bytes,5,opt,name=response,proto3" json:"response,omitempty"`
Metadata map[string]string `` /* 143-byte string literal not displayed */
// contains filtered or unexported fields
}
func (*RouteSchemaProto) Descriptor
deprecated
func (*RouteSchemaProto) Descriptor() ([]byte, []int)
Deprecated: Use RouteSchemaProto.ProtoReflect.Descriptor instead.
func (*RouteSchemaProto) GetMetadata ¶
func (x *RouteSchemaProto) GetMetadata() map[string]string
func (*RouteSchemaProto) GetMethod ¶
func (x *RouteSchemaProto) GetMethod() string
func (*RouteSchemaProto) GetPath ¶
func (x *RouteSchemaProto) GetPath() string
func (*RouteSchemaProto) GetRequest ¶
func (x *RouteSchemaProto) GetRequest() *PayloadSchemaProto
func (*RouteSchemaProto) GetResponse ¶
func (x *RouteSchemaProto) GetResponse() *PayloadSchemaProto
func (*RouteSchemaProto) GetSummary ¶
func (x *RouteSchemaProto) GetSummary() string
func (*RouteSchemaProto) ProtoMessage ¶
func (*RouteSchemaProto) ProtoMessage()
func (*RouteSchemaProto) ProtoReflect ¶
func (x *RouteSchemaProto) ProtoReflect() protoreflect.Message
func (*RouteSchemaProto) Reset ¶
func (x *RouteSchemaProto) Reset()
func (*RouteSchemaProto) String ¶
func (x *RouteSchemaProto) String() string
type RoutesResponse ¶
type RoutesResponse struct {
Routes []*RouteDefinitionProto `protobuf:"bytes,1,rep,name=routes,proto3" json:"routes,omitempty"`
// contains filtered or unexported fields
}
func (*RoutesResponse) Descriptor
deprecated
func (*RoutesResponse) Descriptor() ([]byte, []int)
Deprecated: Use RoutesResponse.ProtoReflect.Descriptor instead.
func (*RoutesResponse) GetRoutes ¶
func (x *RoutesResponse) GetRoutes() []*RouteDefinitionProto
func (*RoutesResponse) ProtoMessage ¶
func (*RoutesResponse) ProtoMessage()
func (*RoutesResponse) ProtoReflect ¶
func (x *RoutesResponse) ProtoReflect() protoreflect.Message
func (*RoutesResponse) Reset ¶
func (x *RoutesResponse) Reset()
func (*RoutesResponse) String ¶
func (x *RoutesResponse) String() string
type RunBackgroundTaskRequest ¶
type RunBackgroundTaskRequest struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// contains filtered or unexported fields
}
func (*RunBackgroundTaskRequest) Descriptor
deprecated
func (*RunBackgroundTaskRequest) Descriptor() ([]byte, []int)
Deprecated: Use RunBackgroundTaskRequest.ProtoReflect.Descriptor instead.
func (*RunBackgroundTaskRequest) GetName ¶
func (x *RunBackgroundTaskRequest) GetName() string
func (*RunBackgroundTaskRequest) ProtoMessage ¶
func (*RunBackgroundTaskRequest) ProtoMessage()
func (*RunBackgroundTaskRequest) ProtoReflect ¶
func (x *RunBackgroundTaskRequest) ProtoReflect() protoreflect.Message
func (*RunBackgroundTaskRequest) Reset ¶
func (x *RunBackgroundTaskRequest) Reset()
func (*RunBackgroundTaskRequest) String ¶
func (x *RunBackgroundTaskRequest) String() string
type StringResponse ¶
type StringResponse struct {
Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
// contains filtered or unexported fields
}
func (*StringResponse) Descriptor
deprecated
func (*StringResponse) Descriptor() ([]byte, []int)
Deprecated: Use StringResponse.ProtoReflect.Descriptor instead.
func (*StringResponse) GetValue ¶
func (x *StringResponse) GetValue() string
func (*StringResponse) ProtoMessage ¶
func (*StringResponse) ProtoMessage()
func (*StringResponse) ProtoReflect ¶
func (x *StringResponse) ProtoReflect() protoreflect.Message
func (*StringResponse) Reset ¶
func (x *StringResponse) Reset()
func (*StringResponse) String ¶
func (x *StringResponse) String() string
type TaskSchemaProto ¶
type TaskSchemaProto struct {
Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
Summary string `protobuf:"bytes,2,opt,name=summary,proto3" json:"summary,omitempty"`
Input *PayloadSchemaProto `protobuf:"bytes,3,opt,name=input,proto3" json:"input,omitempty"`
Output *PayloadSchemaProto `protobuf:"bytes,4,opt,name=output,proto3" json:"output,omitempty"`
Metadata map[string]string `` /* 143-byte string literal not displayed */
// contains filtered or unexported fields
}
func (*TaskSchemaProto) Descriptor
deprecated
func (*TaskSchemaProto) Descriptor() ([]byte, []int)
Deprecated: Use TaskSchemaProto.ProtoReflect.Descriptor instead.
func (*TaskSchemaProto) GetInput ¶
func (x *TaskSchemaProto) GetInput() *PayloadSchemaProto
func (*TaskSchemaProto) GetMetadata ¶
func (x *TaskSchemaProto) GetMetadata() map[string]string
func (*TaskSchemaProto) GetOutput ¶
func (x *TaskSchemaProto) GetOutput() *PayloadSchemaProto
func (*TaskSchemaProto) GetSummary ¶
func (x *TaskSchemaProto) GetSummary() string
func (*TaskSchemaProto) GetType ¶
func (x *TaskSchemaProto) GetType() string
func (*TaskSchemaProto) ProtoMessage ¶
func (*TaskSchemaProto) ProtoMessage()
func (*TaskSchemaProto) ProtoReflect ¶
func (x *TaskSchemaProto) ProtoReflect() protoreflect.Message
func (*TaskSchemaProto) Reset ¶
func (x *TaskSchemaProto) Reset()
func (*TaskSchemaProto) String ¶
func (x *TaskSchemaProto) String() string
type TaskTypesResponse ¶
type TaskTypesResponse struct {
Types []string `protobuf:"bytes,1,rep,name=types,proto3" json:"types,omitempty"`
// contains filtered or unexported fields
}
func (*TaskTypesResponse) Descriptor
deprecated
func (*TaskTypesResponse) Descriptor() ([]byte, []int)
Deprecated: Use TaskTypesResponse.ProtoReflect.Descriptor instead.
func (*TaskTypesResponse) GetTypes ¶
func (x *TaskTypesResponse) GetTypes() []string
func (*TaskTypesResponse) ProtoMessage ¶
func (*TaskTypesResponse) ProtoMessage()
func (*TaskTypesResponse) ProtoReflect ¶
func (x *TaskTypesResponse) ProtoReflect() protoreflect.Message
func (*TaskTypesResponse) Reset ¶
func (x *TaskTypesResponse) Reset()
func (*TaskTypesResponse) String ¶
func (x *TaskTypesResponse) String() string
type UnimplementedCoreInvokeServiceServer ¶
type UnimplementedCoreInvokeServiceServer struct{}
UnimplementedCoreInvokeServiceServer 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 (UnimplementedCoreInvokeServiceServer) Invoke ¶
func (UnimplementedCoreInvokeServiceServer) Invoke(context.Context, *HostInvokeRequest) (*HostInvokeResponse, error)
func (UnimplementedCoreInvokeServiceServer) InvokeStream ¶
func (UnimplementedCoreInvokeServiceServer) InvokeStream(grpc.BidiStreamingServer[HostStreamFrame, HostStreamFrame]) error
type UnimplementedEventServiceServer ¶
type UnimplementedEventServiceServer struct{}
UnimplementedEventServiceServer 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 (UnimplementedEventServiceServer) GetEventSubscriptions ¶
func (UnimplementedEventServiceServer) GetEventSubscriptions(context.Context, *Empty) (*EventSubscriptionsResponse, error)
func (UnimplementedEventServiceServer) HandleEvent ¶
func (UnimplementedEventServiceServer) HandleEvent(context.Context, *PluginEvent) (*EventHandleResponse, error)
type UnimplementedExtensionServiceServer ¶
type UnimplementedExtensionServiceServer struct{}
UnimplementedExtensionServiceServer 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 (UnimplementedExtensionServiceServer) GetBackgroundTasks ¶
func (UnimplementedExtensionServiceServer) GetBackgroundTasks(context.Context, *Empty) (*BackgroundTasksResponse, error)
func (UnimplementedExtensionServiceServer) GetTaskTypes ¶
func (UnimplementedExtensionServiceServer) GetTaskTypes(context.Context, *Empty) (*TaskTypesResponse, error)
func (UnimplementedExtensionServiceServer) HandleRequest ¶
func (UnimplementedExtensionServiceServer) HandleRequest(context.Context, *HttpRequest) (*HttpResponse, error)
func (UnimplementedExtensionServiceServer) HandleStreamRequest ¶
func (UnimplementedExtensionServiceServer) HandleStreamRequest(*HttpRequest, grpc.ServerStreamingServer[HttpResponseChunk]) error
func (UnimplementedExtensionServiceServer) ProcessTask ¶
func (UnimplementedExtensionServiceServer) ProcessTask(context.Context, *ProcessTaskRequest) (*ProcessTaskResponse, error)
func (UnimplementedExtensionServiceServer) RunBackgroundTask ¶
func (UnimplementedExtensionServiceServer) RunBackgroundTask(context.Context, *RunBackgroundTaskRequest) (*Empty, error)
type UnimplementedGatewayServiceServer ¶
type UnimplementedGatewayServiceServer struct{}
UnimplementedGatewayServiceServer 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 (UnimplementedGatewayServiceServer) Forward ¶
func (UnimplementedGatewayServiceServer) Forward(context.Context, *ForwardRequest) (*ForwardOutcome, error)
func (UnimplementedGatewayServiceServer) ForwardStream ¶
func (UnimplementedGatewayServiceServer) ForwardStream(*ForwardRequest, grpc.ServerStreamingServer[ForwardChunk]) error
func (UnimplementedGatewayServiceServer) GetModels ¶
func (UnimplementedGatewayServiceServer) GetModels(context.Context, *Empty) (*ModelsResponse, error)
func (UnimplementedGatewayServiceServer) GetPlatform ¶
func (UnimplementedGatewayServiceServer) GetPlatform(context.Context, *Empty) (*StringResponse, error)
func (UnimplementedGatewayServiceServer) GetRoutes ¶
func (UnimplementedGatewayServiceServer) GetRoutes(context.Context, *Empty) (*RoutesResponse, error)
func (UnimplementedGatewayServiceServer) HandleWebSocket ¶
func (UnimplementedGatewayServiceServer) HandleWebSocket(grpc.BidiStreamingServer[WebSocketFrame, WebSocketFrame]) error
func (UnimplementedGatewayServiceServer) ValidateAccount ¶
func (UnimplementedGatewayServiceServer) ValidateAccount(context.Context, *CredentialsRequest) (*Empty, error)
type UnimplementedMiddlewareServiceServer ¶
type UnimplementedMiddlewareServiceServer struct{}
UnimplementedMiddlewareServiceServer 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 (UnimplementedMiddlewareServiceServer) OnForwardBegin ¶
func (UnimplementedMiddlewareServiceServer) OnForwardBegin(context.Context, *MiddlewareRequest) (*MiddlewareDecision, error)
func (UnimplementedMiddlewareServiceServer) OnForwardEnd ¶
func (UnimplementedMiddlewareServiceServer) OnForwardEnd(context.Context, *MiddlewareEvent) (*Empty, error)
type UnimplementedPluginServiceServer ¶
type UnimplementedPluginServiceServer struct{}
UnimplementedPluginServiceServer 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 (UnimplementedPluginServiceServer) GetInfo ¶
func (UnimplementedPluginServiceServer) GetInfo(context.Context, *Empty) (*PluginInfoResponse, error)
func (UnimplementedPluginServiceServer) GetSchema ¶
func (UnimplementedPluginServiceServer) GetSchema(context.Context, *Empty) (*PluginSchemaResponse, error)
func (UnimplementedPluginServiceServer) GetWebAssets ¶
func (UnimplementedPluginServiceServer) GetWebAssets(context.Context, *Empty) (*WebAssetsResponse, error)
func (UnimplementedPluginServiceServer) HandleRequest ¶
func (UnimplementedPluginServiceServer) HandleRequest(context.Context, *HttpRequest) (*HttpResponse, error)
func (UnimplementedPluginServiceServer) HealthCheck ¶
func (UnimplementedPluginServiceServer) Init ¶
func (UnimplementedPluginServiceServer) Init(context.Context, *InitRequest) (*Empty, error)
type UnsafeCoreInvokeServiceServer ¶
type UnsafeCoreInvokeServiceServer interface {
// contains filtered or unexported methods
}
UnsafeCoreInvokeServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CoreInvokeServiceServer will result in compilation errors.
type UnsafeEventServiceServer ¶
type UnsafeEventServiceServer interface {
// contains filtered or unexported methods
}
UnsafeEventServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to EventServiceServer will result in compilation errors.
type UnsafeExtensionServiceServer ¶
type UnsafeExtensionServiceServer interface {
// contains filtered or unexported methods
}
UnsafeExtensionServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ExtensionServiceServer will result in compilation errors.
type UnsafeGatewayServiceServer ¶
type UnsafeGatewayServiceServer interface {
// contains filtered or unexported methods
}
UnsafeGatewayServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to GatewayServiceServer will result in compilation errors.
type UnsafeMiddlewareServiceServer ¶
type UnsafeMiddlewareServiceServer interface {
// contains filtered or unexported methods
}
UnsafeMiddlewareServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to MiddlewareServiceServer will result in compilation errors.
type UnsafePluginServiceServer ¶
type UnsafePluginServiceServer interface {
// contains filtered or unexported methods
}
UnsafePluginServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to PluginServiceServer will result in compilation errors.
type UpstreamResponse ¶
type UpstreamResponse struct {
StatusCode int32 `protobuf:"varint,1,opt,name=status_code,json=statusCode,proto3" json:"status_code,omitempty"`
Headers map[string]*HeaderValues `` /* 141-byte string literal not displayed */
Body []byte `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"`
// contains filtered or unexported fields
}
UpstreamResponse 上游返回的原始 HTTP 快照。
func (*UpstreamResponse) Descriptor
deprecated
func (*UpstreamResponse) Descriptor() ([]byte, []int)
Deprecated: Use UpstreamResponse.ProtoReflect.Descriptor instead.
func (*UpstreamResponse) GetBody ¶
func (x *UpstreamResponse) GetBody() []byte
func (*UpstreamResponse) GetHeaders ¶
func (x *UpstreamResponse) GetHeaders() map[string]*HeaderValues
func (*UpstreamResponse) GetStatusCode ¶
func (x *UpstreamResponse) GetStatusCode() int32
func (*UpstreamResponse) ProtoMessage ¶
func (*UpstreamResponse) ProtoMessage()
func (*UpstreamResponse) ProtoReflect ¶
func (x *UpstreamResponse) ProtoReflect() protoreflect.Message
func (*UpstreamResponse) Reset ¶
func (x *UpstreamResponse) Reset()
func (*UpstreamResponse) String ¶
func (x *UpstreamResponse) String() string
type Usage ¶
type Usage struct {
Model string `protobuf:"bytes,1,opt,name=model,proto3" json:"model,omitempty"`
AccountCost float64 `protobuf:"fixed64,2,opt,name=account_cost,json=accountCost,proto3" json:"account_cost,omitempty"`
UserCost float64 `protobuf:"fixed64,3,opt,name=user_cost,json=userCost,proto3" json:"user_cost,omitempty"`
BillingMultiplier float64 `protobuf:"fixed64,4,opt,name=billing_multiplier,json=billingMultiplier,proto3" json:"billing_multiplier,omitempty"`
Currency string `protobuf:"bytes,5,opt,name=currency,proto3" json:"currency,omitempty"`
Summary string `protobuf:"bytes,6,opt,name=summary,proto3" json:"summary,omitempty"`
FirstTokenMs int64 `protobuf:"varint,7,opt,name=first_token_ms,json=firstTokenMs,proto3" json:"first_token_ms,omitempty"`
Metadata map[string]string `` /* 144-byte string literal not displayed */
InputTokens int64 `protobuf:"varint,12,opt,name=input_tokens,json=inputTokens,proto3" json:"input_tokens,omitempty"`
OutputTokens int64 `protobuf:"varint,13,opt,name=output_tokens,json=outputTokens,proto3" json:"output_tokens,omitempty"`
CachedInputTokens int64 `protobuf:"varint,14,opt,name=cached_input_tokens,json=cachedInputTokens,proto3" json:"cached_input_tokens,omitempty"`
CacheCreationTokens int64 `protobuf:"varint,15,opt,name=cache_creation_tokens,json=cacheCreationTokens,proto3" json:"cache_creation_tokens,omitempty"`
ReasoningOutputTokens int64 `` /* 128-byte string literal not displayed */
InputPrice float64 `protobuf:"fixed64,22,opt,name=input_price,json=inputPrice,proto3" json:"input_price,omitempty"`
OutputPrice float64 `protobuf:"fixed64,23,opt,name=output_price,json=outputPrice,proto3" json:"output_price,omitempty"`
CachedInputPrice float64 `protobuf:"fixed64,24,opt,name=cached_input_price,json=cachedInputPrice,proto3" json:"cached_input_price,omitempty"`
CacheCreationPrice float64 `protobuf:"fixed64,25,opt,name=cache_creation_price,json=cacheCreationPrice,proto3" json:"cache_creation_price,omitempty"`
InputCost float64 `protobuf:"fixed64,27,opt,name=input_cost,json=inputCost,proto3" json:"input_cost,omitempty"`
OutputCost float64 `protobuf:"fixed64,28,opt,name=output_cost,json=outputCost,proto3" json:"output_cost,omitempty"`
CachedInputCost float64 `protobuf:"fixed64,29,opt,name=cached_input_cost,json=cachedInputCost,proto3" json:"cached_input_cost,omitempty"`
CacheCreationCost float64 `protobuf:"fixed64,30,opt,name=cache_creation_cost,json=cacheCreationCost,proto3" json:"cache_creation_cost,omitempty"`
ReasoningEffort string `protobuf:"bytes,35,opt,name=reasoning_effort,json=reasoningEffort,proto3" json:"reasoning_effort,omitempty"`
// contains filtered or unexported fields
}
Usage 单次调用的用量与费用结果。非 Success 判决下应为空。
func (*Usage) Descriptor
deprecated
func (*Usage) GetAccountCost ¶
func (*Usage) GetBillingMultiplier ¶
func (*Usage) GetCacheCreationCost ¶
func (*Usage) GetCacheCreationPrice ¶
func (*Usage) GetCacheCreationTokens ¶
func (*Usage) GetCachedInputCost ¶
func (*Usage) GetCachedInputPrice ¶
func (*Usage) GetCachedInputTokens ¶
func (*Usage) GetCurrency ¶
func (*Usage) GetFirstTokenMs ¶
func (*Usage) GetInputCost ¶
func (*Usage) GetInputPrice ¶
func (*Usage) GetInputTokens ¶
func (*Usage) GetMetadata ¶
func (*Usage) GetOutputCost ¶
func (*Usage) GetOutputPrice ¶
func (*Usage) GetOutputTokens ¶
func (*Usage) GetReasoningEffort ¶
func (*Usage) GetReasoningOutputTokens ¶
func (*Usage) GetSummary ¶
func (*Usage) GetUserCost ¶
func (*Usage) ProtoMessage ¶
func (*Usage) ProtoMessage()
func (*Usage) ProtoReflect ¶
func (x *Usage) ProtoReflect() protoreflect.Message
type WebAssetFile ¶
type WebAssetFile struct {
Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
Content []byte `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"`
// contains filtered or unexported fields
}
func (*WebAssetFile) Descriptor
deprecated
func (*WebAssetFile) Descriptor() ([]byte, []int)
Deprecated: Use WebAssetFile.ProtoReflect.Descriptor instead.
func (*WebAssetFile) GetContent ¶
func (x *WebAssetFile) GetContent() []byte
func (*WebAssetFile) GetPath ¶
func (x *WebAssetFile) GetPath() string
func (*WebAssetFile) ProtoMessage ¶
func (*WebAssetFile) ProtoMessage()
func (*WebAssetFile) ProtoReflect ¶
func (x *WebAssetFile) ProtoReflect() protoreflect.Message
func (*WebAssetFile) Reset ¶
func (x *WebAssetFile) Reset()
func (*WebAssetFile) String ¶
func (x *WebAssetFile) String() string
type WebAssetsResponse ¶
type WebAssetsResponse struct {
Files []*WebAssetFile `protobuf:"bytes,1,rep,name=files,proto3" json:"files,omitempty"`
HasAssets bool `protobuf:"varint,2,opt,name=has_assets,json=hasAssets,proto3" json:"has_assets,omitempty"`
// contains filtered or unexported fields
}
func (*WebAssetsResponse) Descriptor
deprecated
func (*WebAssetsResponse) Descriptor() ([]byte, []int)
Deprecated: Use WebAssetsResponse.ProtoReflect.Descriptor instead.
func (*WebAssetsResponse) GetFiles ¶
func (x *WebAssetsResponse) GetFiles() []*WebAssetFile
func (*WebAssetsResponse) GetHasAssets ¶
func (x *WebAssetsResponse) GetHasAssets() bool
func (*WebAssetsResponse) ProtoMessage ¶
func (*WebAssetsResponse) ProtoMessage()
func (*WebAssetsResponse) ProtoReflect ¶
func (x *WebAssetsResponse) ProtoReflect() protoreflect.Message
func (*WebAssetsResponse) Reset ¶
func (x *WebAssetsResponse) Reset()
func (*WebAssetsResponse) String ¶
func (x *WebAssetsResponse) String() string
type WebSocketConnectInfo ¶
type WebSocketConnectInfo struct {
Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
Query string `protobuf:"bytes,2,opt,name=query,proto3" json:"query,omitempty"`
Headers map[string]*HeaderValues `` /* 141-byte string literal not displayed */
RemoteAddr string `protobuf:"bytes,4,opt,name=remote_addr,json=remoteAddr,proto3" json:"remote_addr,omitempty"`
ConnectionId string `protobuf:"bytes,5,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty"`
Account *AccountProto `protobuf:"bytes,12,opt,name=account,proto3" json:"account,omitempty"`
// contains filtered or unexported fields
}
func (*WebSocketConnectInfo) Descriptor
deprecated
func (*WebSocketConnectInfo) Descriptor() ([]byte, []int)
Deprecated: Use WebSocketConnectInfo.ProtoReflect.Descriptor instead.
func (*WebSocketConnectInfo) GetAccount ¶
func (x *WebSocketConnectInfo) GetAccount() *AccountProto
func (*WebSocketConnectInfo) GetConnectionId ¶
func (x *WebSocketConnectInfo) GetConnectionId() string
func (*WebSocketConnectInfo) GetHeaders ¶
func (x *WebSocketConnectInfo) GetHeaders() map[string]*HeaderValues
func (*WebSocketConnectInfo) GetPath ¶
func (x *WebSocketConnectInfo) GetPath() string
func (*WebSocketConnectInfo) GetQuery ¶
func (x *WebSocketConnectInfo) GetQuery() string
func (*WebSocketConnectInfo) GetRemoteAddr ¶
func (x *WebSocketConnectInfo) GetRemoteAddr() string
func (*WebSocketConnectInfo) ProtoMessage ¶
func (*WebSocketConnectInfo) ProtoMessage()
func (*WebSocketConnectInfo) ProtoReflect ¶
func (x *WebSocketConnectInfo) ProtoReflect() protoreflect.Message
func (*WebSocketConnectInfo) Reset ¶
func (x *WebSocketConnectInfo) Reset()
func (*WebSocketConnectInfo) String ¶
func (x *WebSocketConnectInfo) String() string
type WebSocketFrame ¶
type WebSocketFrame struct {
Type WebSocketFrame_FrameType `protobuf:"varint,1,opt,name=type,proto3,enum=airgate.plugin.v1.WebSocketFrame_FrameType" json:"type,omitempty"`
Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
// 仅 CONNECT 帧使用
ConnectInfo *WebSocketConnectInfo `protobuf:"bytes,3,opt,name=connect_info,json=connectInfo,proto3" json:"connect_info,omitempty"`
// 仅 CLOSE 帧使用
CloseCode int32 `protobuf:"varint,4,opt,name=close_code,json=closeCode,proto3" json:"close_code,omitempty"`
CloseReason string `protobuf:"bytes,5,opt,name=close_reason,json=closeReason,proto3" json:"close_reason,omitempty"`
// 仅 RESULT 帧使用
Outcome *ForwardOutcome `protobuf:"bytes,6,opt,name=outcome,proto3" json:"outcome,omitempty"`
// contains filtered or unexported fields
}
func (*WebSocketFrame) Descriptor
deprecated
func (*WebSocketFrame) Descriptor() ([]byte, []int)
Deprecated: Use WebSocketFrame.ProtoReflect.Descriptor instead.
func (*WebSocketFrame) GetCloseCode ¶
func (x *WebSocketFrame) GetCloseCode() int32
func (*WebSocketFrame) GetCloseReason ¶
func (x *WebSocketFrame) GetCloseReason() string
func (*WebSocketFrame) GetConnectInfo ¶
func (x *WebSocketFrame) GetConnectInfo() *WebSocketConnectInfo
func (*WebSocketFrame) GetData ¶
func (x *WebSocketFrame) GetData() []byte
func (*WebSocketFrame) GetOutcome ¶
func (x *WebSocketFrame) GetOutcome() *ForwardOutcome
func (*WebSocketFrame) GetType ¶
func (x *WebSocketFrame) GetType() WebSocketFrame_FrameType
func (*WebSocketFrame) ProtoMessage ¶
func (*WebSocketFrame) ProtoMessage()
func (*WebSocketFrame) ProtoReflect ¶
func (x *WebSocketFrame) ProtoReflect() protoreflect.Message
func (*WebSocketFrame) Reset ¶
func (x *WebSocketFrame) Reset()
func (*WebSocketFrame) String ¶
func (x *WebSocketFrame) String() string
type WebSocketFrame_FrameType ¶
type WebSocketFrame_FrameType int32
const ( WebSocketFrame_CONNECT WebSocketFrame_FrameType = 0 // 连接建立,携带元信息(仅第一帧) WebSocketFrame_TEXT WebSocketFrame_FrameType = 1 // 文本消息 WebSocketFrame_BINARY WebSocketFrame_FrameType = 2 // 二进制消息 WebSocketFrame_CLOSE WebSocketFrame_FrameType = 3 // 关闭连接 WebSocketFrame_RESULT WebSocketFrame_FrameType = 4 // 连接结束,携带 ForwardOutcome )
func (WebSocketFrame_FrameType) Descriptor ¶
func (WebSocketFrame_FrameType) Descriptor() protoreflect.EnumDescriptor
func (WebSocketFrame_FrameType) Enum ¶
func (x WebSocketFrame_FrameType) Enum() *WebSocketFrame_FrameType
func (WebSocketFrame_FrameType) EnumDescriptor
deprecated
func (WebSocketFrame_FrameType) EnumDescriptor() ([]byte, []int)
Deprecated: Use WebSocketFrame_FrameType.Descriptor instead.
func (WebSocketFrame_FrameType) Number ¶
func (x WebSocketFrame_FrameType) Number() protoreflect.EnumNumber
func (WebSocketFrame_FrameType) String ¶
func (x WebSocketFrame_FrameType) String() string
func (WebSocketFrame_FrameType) Type ¶
func (WebSocketFrame_FrameType) Type() protoreflect.EnumType