customunits

package
v1.1.105 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MetricReportingService_MetricReporting_FullMethodName = "/amplify.agent.customunits.MetricReportingService/MetricReporting"
)
View Source
const (
	QuotaEnforcement_QuotaEnforcementInfo_FullMethodName = "/amplify.agent.customunits.QuotaEnforcement/QuotaEnforcementInfo"
)

Variables

View Source
var (
	APIServiceLookupType_name = map[int32]string{
		0: "CustomAPIServiceLookup",
		1: "ServiceName",
		2: "ServiceID",
		3: "ExternalAPIID",
	}
	APIServiceLookupType_value = map[string]int32{
		"CustomAPIServiceLookup": 0,
		"ServiceName":            1,
		"ServiceID":              2,
		"ExternalAPIID":          3,
	}
)

Enum value maps for APIServiceLookupType.

View Source
var (
	AppLookupType_name = map[int32]string{
		0: "CustomAppLookup",
		1: "ManagedAppName",
		2: "ManagedAppID",
		3: "ExternalAppID",
	}
	AppLookupType_value = map[string]int32{
		"CustomAppLookup": 0,
		"ManagedAppName":  1,
		"ManagedAppID":    2,
		"ExternalAppID":   3,
	}
)

Enum value maps for AppLookupType.

View Source
var (
	QuotaIntervalType_name = map[int32]string{
		0: "IntervalUnspecified",
		1: "IntervalAnnually",
		2: "IntervalMonthly",
		3: "IntervalWeekly",
		4: "IntervalDaily",
	}
	QuotaIntervalType_value = map[string]int32{
		"IntervalUnspecified": 0,
		"IntervalAnnually":    1,
		"IntervalMonthly":     2,
		"IntervalWeekly":      3,
		"IntervalDaily":       4,
	}
)

Enum value maps for QuotaIntervalType.

View Source
var File_customunits_customunits_proto protoreflect.FileDescriptor
View Source
var MetricReportingService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "amplify.agent.customunits.MetricReportingService",
	HandlerType: (*MetricReportingServiceServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "MetricReporting",
			Handler:       _MetricReportingService_MetricReporting_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "customunits/customunits.proto",
}

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

View Source
var QuotaEnforcement_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "amplify.agent.customunits.QuotaEnforcement",
	HandlerType: (*QuotaEnforcementServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "QuotaEnforcementInfo",
			Handler:    _QuotaEnforcement_QuotaEnforcementInfo_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "customunits/customunits.proto",
}

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

Functions

func RegisterMetricReportingServiceServer

func RegisterMetricReportingServiceServer(s grpc.ServiceRegistrar, srv MetricReportingServiceServer)

func RegisterQuotaEnforcementServer

func RegisterQuotaEnforcementServer(s grpc.ServiceRegistrar, srv QuotaEnforcementServer)

Types

type APIInfo

type APIInfo struct {
	ServiceDetails map[string]string `` // x-agent-details from the API Service
	/* 169-byte string literal not displayed */
	ServiceName   string `protobuf:"bytes,2,opt,name=ServiceName,proto3" json:"ServiceName,omitempty"`
	ServiceID     string `protobuf:"bytes,3,opt,name=ServiceID,proto3" json:"ServiceID,omitempty"`
	ExternalAPIID string `protobuf:"bytes,4,opt,name=ExternalAPIID,proto3" json:"ExternalAPIID,omitempty"`
	// contains filtered or unexported fields
}

func (*APIInfo) Descriptor deprecated

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

Deprecated: Use APIInfo.ProtoReflect.Descriptor instead.

func (*APIInfo) GetExternalAPIID

func (x *APIInfo) GetExternalAPIID() string

func (*APIInfo) GetServiceDetails

func (x *APIInfo) GetServiceDetails() map[string]string

func (*APIInfo) GetServiceID

func (x *APIInfo) GetServiceID() string

func (*APIInfo) GetServiceName

func (x *APIInfo) GetServiceName() string

func (*APIInfo) ProtoMessage

func (*APIInfo) ProtoMessage()

func (*APIInfo) ProtoReflect

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

func (*APIInfo) Reset

func (x *APIInfo) Reset()

func (*APIInfo) String

func (x *APIInfo) String() string

type APIServiceLookup

type APIServiceLookup struct {

	// the type that the agent will look to match against in the resource
	Type APIServiceLookupType `protobuf:"varint,1,opt,name=type,proto3,enum=amplify.agent.customunits.APIServiceLookupType" json:"type,omitempty"`
	// Only required when Custom is the type
	CustomAttribute string `protobuf:"bytes,2,opt,name=customAttribute,proto3" json:"customAttribute,omitempty"`
	// the value of the attribute the agent will look for in the resource
	Value string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*APIServiceLookup) Descriptor deprecated

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

Deprecated: Use APIServiceLookup.ProtoReflect.Descriptor instead.

func (*APIServiceLookup) GetCustomAttribute

func (x *APIServiceLookup) GetCustomAttribute() string

func (*APIServiceLookup) GetType

func (*APIServiceLookup) GetValue

func (x *APIServiceLookup) GetValue() string

func (*APIServiceLookup) ProtoMessage

func (*APIServiceLookup) ProtoMessage()

func (*APIServiceLookup) ProtoReflect

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

func (*APIServiceLookup) Reset

func (x *APIServiceLookup) Reset()

func (*APIServiceLookup) String

func (x *APIServiceLookup) String() string

type APIServiceLookupType

type APIServiceLookupType int32
const (
	APIServiceLookupType_CustomAPIServiceLookup APIServiceLookupType = 0
	APIServiceLookupType_ServiceName            APIServiceLookupType = 1
	APIServiceLookupType_ServiceID              APIServiceLookupType = 2
	APIServiceLookupType_ExternalAPIID          APIServiceLookupType = 3
)

func (APIServiceLookupType) Descriptor

func (APIServiceLookupType) Enum

func (APIServiceLookupType) EnumDescriptor deprecated

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

Deprecated: Use APIServiceLookupType.Descriptor instead.

func (APIServiceLookupType) Number

func (APIServiceLookupType) String

func (x APIServiceLookupType) String() string

func (APIServiceLookupType) Type

type AppInfo

type AppInfo struct {
	AppDetails map[string]string `` // x-agent-details from the Managed App
	/* 161-byte string literal not displayed */
	AppName       string `protobuf:"bytes,2,opt,name=AppName,proto3" json:"AppName,omitempty"`
	AppID         string `protobuf:"bytes,3,opt,name=AppID,proto3" json:"AppID,omitempty"`
	ExternalAppID string `protobuf:"bytes,4,opt,name=ExternalAppID,proto3" json:"ExternalAppID,omitempty"`
	// contains filtered or unexported fields
}

func (*AppInfo) Descriptor deprecated

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

Deprecated: Use AppInfo.ProtoReflect.Descriptor instead.

func (*AppInfo) GetAppDetails

func (x *AppInfo) GetAppDetails() map[string]string

func (*AppInfo) GetAppID

func (x *AppInfo) GetAppID() string

func (*AppInfo) GetAppName

func (x *AppInfo) GetAppName() string

func (*AppInfo) GetExternalAppID

func (x *AppInfo) GetExternalAppID() string

func (*AppInfo) ProtoMessage

func (*AppInfo) ProtoMessage()

func (*AppInfo) ProtoReflect

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

func (*AppInfo) Reset

func (x *AppInfo) Reset()

func (*AppInfo) String

func (x *AppInfo) String() string

type AppLookup

type AppLookup struct {

	// the type that the agent will look to match against in the resource
	Type AppLookupType `protobuf:"varint,1,opt,name=type,proto3,enum=amplify.agent.customunits.AppLookupType" json:"type,omitempty"`
	// Only required when Custom is the type
	CustomAttribute string `protobuf:"bytes,2,opt,name=customAttribute,proto3" json:"customAttribute,omitempty"`
	// the value of the attribute the agent will look for in the resource
	Value string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*AppLookup) Descriptor deprecated

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

Deprecated: Use AppLookup.ProtoReflect.Descriptor instead.

func (*AppLookup) GetCustomAttribute

func (x *AppLookup) GetCustomAttribute() string

func (*AppLookup) GetType

func (x *AppLookup) GetType() AppLookupType

func (*AppLookup) GetValue

func (x *AppLookup) GetValue() string

func (*AppLookup) ProtoMessage

func (*AppLookup) ProtoMessage()

func (*AppLookup) ProtoReflect

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

func (*AppLookup) Reset

func (x *AppLookup) Reset()

func (*AppLookup) String

func (x *AppLookup) String() string

type AppLookupType

type AppLookupType int32
const (
	AppLookupType_CustomAppLookup AppLookupType = 0
	AppLookupType_ManagedAppName  AppLookupType = 1
	AppLookupType_ManagedAppID    AppLookupType = 2
	AppLookupType_ExternalAppID   AppLookupType = 3
)

func (AppLookupType) Descriptor

func (AppLookupType) Enum

func (x AppLookupType) Enum() *AppLookupType

func (AppLookupType) EnumDescriptor deprecated

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

Deprecated: Use AppLookupType.Descriptor instead.

func (AppLookupType) Number

func (AppLookupType) String

func (x AppLookupType) String() string

func (AppLookupType) Type

type MetricReport

type MetricReport struct {
	Count      int64             `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"`
	ApiService *APIServiceLookup `protobuf:"bytes,2,opt,name=apiService,proto3" json:"apiService,omitempty"`
	ManagedApp *AppLookup        `protobuf:"bytes,3,opt,name=managedApp,proto3" json:"managedApp,omitempty"`
	PlanUnit   *UnitLookup       `protobuf:"bytes,4,opt,name=planUnit,proto3" json:"planUnit,omitempty"`
	// contains filtered or unexported fields
}

this message will be received continually

func (*MetricReport) Descriptor deprecated

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

Deprecated: Use MetricReport.ProtoReflect.Descriptor instead.

func (*MetricReport) GetApiService

func (x *MetricReport) GetApiService() *APIServiceLookup

func (*MetricReport) GetCount

func (x *MetricReport) GetCount() int64

func (*MetricReport) GetManagedApp

func (x *MetricReport) GetManagedApp() *AppLookup

func (*MetricReport) GetPlanUnit

func (x *MetricReport) GetPlanUnit() *UnitLookup

func (*MetricReport) ProtoMessage

func (*MetricReport) ProtoMessage()

func (*MetricReport) ProtoReflect

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

func (*MetricReport) Reset

func (x *MetricReport) Reset()

func (*MetricReport) String

func (x *MetricReport) String() string

type MetricReportingServiceClient

type MetricReportingServiceClient interface {
	// The agent will initiate the connection to the service and the service can then begin to send metric data for the SDK to handle
	MetricReporting(ctx context.Context, in *MetricServiceInit, opts ...grpc.CallOption) (MetricReportingService_MetricReportingClient, error)
}

MetricReportingServiceClient is the client API for MetricReportingService service.

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

type MetricReportingServiceServer

type MetricReportingServiceServer interface {
	// The agent will initiate the connection to the service and the service can then begin to send metric data for the SDK to handle
	MetricReporting(*MetricServiceInit, MetricReportingService_MetricReportingServer) error
	// contains filtered or unexported methods
}

MetricReportingServiceServer is the server API for MetricReportingService service. All implementations must embed UnimplementedMetricReportingServiceServer for forward compatibility

type MetricReportingService_MetricReportingClient

type MetricReportingService_MetricReportingClient interface {
	Recv() (*MetricReport, error)
	grpc.ClientStream
}

type MetricReportingService_MetricReportingServer

type MetricReportingService_MetricReportingServer interface {
	Send(*MetricReport) error
	grpc.ServerStream
}

type MetricServiceInit

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

message to start the connection to the custom metric reporting service

func (*MetricServiceInit) Descriptor deprecated

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

Deprecated: Use MetricServiceInit.ProtoReflect.Descriptor instead.

func (*MetricServiceInit) ProtoMessage

func (*MetricServiceInit) ProtoMessage()

func (*MetricServiceInit) ProtoReflect

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

func (*MetricServiceInit) Reset

func (x *MetricServiceInit) Reset()

func (*MetricServiceInit) String

func (x *MetricServiceInit) String() string

type Quota

type Quota struct {
	Count    int64             `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"`
	Unit     string            `protobuf:"bytes,2,opt,name=unit,proto3" json:"unit,omitempty"`
	Interval QuotaIntervalType `protobuf:"varint,3,opt,name=interval,proto3,enum=amplify.agent.customunits.QuotaIntervalType" json:"interval,omitempty"`
	// contains filtered or unexported fields
}

func (*Quota) Descriptor deprecated

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

Deprecated: Use Quota.ProtoReflect.Descriptor instead.

func (*Quota) GetCount

func (x *Quota) GetCount() int64

func (*Quota) GetInterval

func (x *Quota) GetInterval() QuotaIntervalType

func (*Quota) GetUnit

func (x *Quota) GetUnit() string

func (*Quota) ProtoMessage

func (*Quota) ProtoMessage()

func (*Quota) ProtoReflect

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

func (*Quota) Reset

func (x *Quota) Reset()

func (*Quota) String

func (x *Quota) String() string

type QuotaEnforcementClient

type QuotaEnforcementClient interface {
	// The discovery agent will reach out, if configured, to allow the external service to provision any quota enforcement or access it may need to
	QuotaEnforcementInfo(ctx context.Context, in *QuotaInfo, opts ...grpc.CallOption) (*QuotaEnforcementResponse, error)
}

QuotaEnforcementClient is the client API for QuotaEnforcement service.

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

type QuotaEnforcementResponse

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

response received for the quota enforcement rpc

func (*QuotaEnforcementResponse) Descriptor deprecated

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

Deprecated: Use QuotaEnforcementResponse.ProtoReflect.Descriptor instead.

func (*QuotaEnforcementResponse) GetError

func (x *QuotaEnforcementResponse) GetError() string

func (*QuotaEnforcementResponse) ProtoMessage

func (*QuotaEnforcementResponse) ProtoMessage()

func (*QuotaEnforcementResponse) ProtoReflect

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

func (*QuotaEnforcementResponse) Reset

func (x *QuotaEnforcementResponse) Reset()

func (*QuotaEnforcementResponse) String

func (x *QuotaEnforcementResponse) String() string

type QuotaEnforcementServer

type QuotaEnforcementServer interface {
	// The discovery agent will reach out, if configured, to allow the external service to provision any quota enforcement or access it may need to
	QuotaEnforcementInfo(context.Context, *QuotaInfo) (*QuotaEnforcementResponse, error)
	// contains filtered or unexported methods
}

QuotaEnforcementServer is the server API for QuotaEnforcement service. All implementations must embed UnimplementedQuotaEnforcementServer for forward compatibility

type QuotaInfo

type QuotaInfo struct {
	ApiInfo *APIInfo `protobuf:"bytes,1,opt,name=apiInfo,proto3" json:"apiInfo,omitempty"`
	AppInfo *AppInfo `protobuf:"bytes,2,opt,name=appInfo,proto3" json:"appInfo,omitempty"`
	Quota   *Quota   `protobuf:"bytes,3,opt,name=quota,proto3" json:"quota,omitempty"` // custom quota information
	// contains filtered or unexported fields
}

message to send to the metric service for enforcing a quota

func (*QuotaInfo) Descriptor deprecated

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

Deprecated: Use QuotaInfo.ProtoReflect.Descriptor instead.

func (*QuotaInfo) GetApiInfo

func (x *QuotaInfo) GetApiInfo() *APIInfo

func (*QuotaInfo) GetAppInfo

func (x *QuotaInfo) GetAppInfo() *AppInfo

func (*QuotaInfo) GetQuota

func (x *QuotaInfo) GetQuota() *Quota

func (*QuotaInfo) ProtoMessage

func (*QuotaInfo) ProtoMessage()

func (*QuotaInfo) ProtoReflect

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

func (*QuotaInfo) Reset

func (x *QuotaInfo) Reset()

func (*QuotaInfo) String

func (x *QuotaInfo) String() string

type QuotaIntervalType

type QuotaIntervalType int32
const (
	QuotaIntervalType_IntervalUnspecified QuotaIntervalType = 0
	QuotaIntervalType_IntervalAnnually    QuotaIntervalType = 1
	QuotaIntervalType_IntervalMonthly     QuotaIntervalType = 2
	QuotaIntervalType_IntervalWeekly      QuotaIntervalType = 3
	QuotaIntervalType_IntervalDaily       QuotaIntervalType = 4
)

func (QuotaIntervalType) Descriptor

func (QuotaIntervalType) Enum

func (QuotaIntervalType) EnumDescriptor deprecated

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

Deprecated: Use QuotaIntervalType.Descriptor instead.

func (QuotaIntervalType) Number

func (QuotaIntervalType) String

func (x QuotaIntervalType) String() string

func (QuotaIntervalType) Type

type UnimplementedMetricReportingServiceServer

type UnimplementedMetricReportingServiceServer struct {
}

UnimplementedMetricReportingServiceServer must be embedded to have forward compatible implementations.

type UnimplementedQuotaEnforcementServer

type UnimplementedQuotaEnforcementServer struct {
}

UnimplementedQuotaEnforcementServer must be embedded to have forward compatible implementations.

func (UnimplementedQuotaEnforcementServer) QuotaEnforcementInfo

type UnitLookup

type UnitLookup struct {

	// the logical name of the plan unit the agent will look for in the resource
	UnitName string `protobuf:"bytes,1,opt,name=unitName,proto3" json:"unitName,omitempty"`
	// contains filtered or unexported fields
}

func (*UnitLookup) Descriptor deprecated

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

Deprecated: Use UnitLookup.ProtoReflect.Descriptor instead.

func (*UnitLookup) GetUnitName

func (x *UnitLookup) GetUnitName() string

func (*UnitLookup) ProtoMessage

func (*UnitLookup) ProtoMessage()

func (*UnitLookup) ProtoReflect

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

func (*UnitLookup) Reset

func (x *UnitLookup) Reset()

func (*UnitLookup) String

func (x *UnitLookup) String() string

type UnsafeMetricReportingServiceServer

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

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

type UnsafeQuotaEnforcementServer

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

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

Jump to

Keyboard shortcuts

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