resourceusagev1

package
v0.0.0-...-0a26cdc Latest Latest
Warning

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

Go to latest
Published: May 10, 2024 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

View Source
const (
	ResourceUsageService_GetUsage_FullMethodName = "/teleport.resourceusage.v1.ResourceUsageService/GetUsage"
)

Variables

View Source
var (
	AccountUsageType_name = map[int32]string{
		0: "ACCOUNT_USAGE_TYPE_UNSPECIFIED",
		1: "ACCOUNT_USAGE_TYPE_UNLIMITED",
		2: "ACCOUNT_USAGE_TYPE_USAGE_BASED",
	}
	AccountUsageType_value = map[string]int32{
		"ACCOUNT_USAGE_TYPE_UNSPECIFIED": 0,
		"ACCOUNT_USAGE_TYPE_UNLIMITED":   1,
		"ACCOUNT_USAGE_TYPE_USAGE_BASED": 2,
	}
)

Enum value maps for AccountUsageType.

View Source
var File_teleport_resourceusage_v1_access_requests_proto protoreflect.FileDescriptor
View Source
var File_teleport_resourceusage_v1_account_usage_type_proto protoreflect.FileDescriptor
View Source
var File_teleport_resourceusage_v1_device_trust_proto protoreflect.FileDescriptor
View Source
var File_teleport_resourceusage_v1_resourceusage_service_proto protoreflect.FileDescriptor
View Source
var ResourceUsageService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "teleport.resourceusage.v1.ResourceUsageService",
	HandlerType: (*ResourceUsageServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetUsage",
			Handler:    _ResourceUsageService_GetUsage_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "teleport/resourceusage/v1/resourceusage_service.proto",
}

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

Functions

func RegisterResourceUsageServiceServer

func RegisterResourceUsageServiceServer(s grpc.ServiceRegistrar, srv ResourceUsageServiceServer)

Types

type AccessRequestsUsage

type AccessRequestsUsage struct {

	// MonthlyLimit is the amount of requests that are allowed per month
	MonthlyLimit int32 `protobuf:"varint,1,opt,name=monthly_limit,json=monthlyLimit,proto3" json:"monthly_limit,omitempty"`
	// MonthlyUsed is the amount of requests that have been used this month
	MonthlyUsed int32 `protobuf:"varint,2,opt,name=monthly_used,json=monthlyUsed,proto3" json:"monthly_used,omitempty"`
	// contains filtered or unexported fields
}

AccessRequestsUsage defines the usage limits for access requests. Usage is limited on the basis of access requests used per calendar month.

func (*AccessRequestsUsage) Descriptor deprecated

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

Deprecated: Use AccessRequestsUsage.ProtoReflect.Descriptor instead.

func (*AccessRequestsUsage) GetMonthlyLimit

func (x *AccessRequestsUsage) GetMonthlyLimit() int32

func (*AccessRequestsUsage) GetMonthlyUsed

func (x *AccessRequestsUsage) GetMonthlyUsed() int32

func (*AccessRequestsUsage) ProtoMessage

func (*AccessRequestsUsage) ProtoMessage()

func (*AccessRequestsUsage) ProtoReflect

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

func (*AccessRequestsUsage) Reset

func (x *AccessRequestsUsage) Reset()

func (*AccessRequestsUsage) String

func (x *AccessRequestsUsage) String() string

type AccountUsageType

type AccountUsageType int32

AccountUsageType is the type of the underlying account, either limitless or limit-based.

const (
	AccountUsageType_ACCOUNT_USAGE_TYPE_UNSPECIFIED AccountUsageType = 0
	AccountUsageType_ACCOUNT_USAGE_TYPE_UNLIMITED   AccountUsageType = 1
	AccountUsageType_ACCOUNT_USAGE_TYPE_USAGE_BASED AccountUsageType = 2
)

func (AccountUsageType) Descriptor

func (AccountUsageType) Enum

func (AccountUsageType) EnumDescriptor deprecated

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

Deprecated: Use AccountUsageType.Descriptor instead.

func (AccountUsageType) Number

func (AccountUsageType) String

func (x AccountUsageType) String() string

func (AccountUsageType) Type

type DevicesUsage

type DevicesUsage struct {

	// Devices usage limit.
	// Always zero if the account usage type is ACCOUNT_USAGE_TYPE_UNLIMITED.
	DevicesUsageLimit int32 `protobuf:"varint,1,opt,name=devices_usage_limit,json=devicesUsageLimit,proto3" json:"devices_usage_limit,omitempty"`
	// Devices in use.
	// May be greater than [devices_usage_limit] in some cases.
	// Always zero if the account usage type is ACCOUNT_USAGE_TYPE_UNLIMITED.
	DevicesInUse int32 `protobuf:"varint,2,opt,name=devices_in_use,json=devicesInUse,proto3" json:"devices_in_use,omitempty"`
	// contains filtered or unexported fields
}

DevicesUsage holds aggregated information about trusted device usage.

func (*DevicesUsage) Descriptor deprecated

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

Deprecated: Use DevicesUsage.ProtoReflect.Descriptor instead.

func (*DevicesUsage) GetDevicesInUse

func (x *DevicesUsage) GetDevicesInUse() int32

func (*DevicesUsage) GetDevicesUsageLimit

func (x *DevicesUsage) GetDevicesUsageLimit() int32

func (*DevicesUsage) ProtoMessage

func (*DevicesUsage) ProtoMessage()

func (*DevicesUsage) ProtoReflect

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

func (*DevicesUsage) Reset

func (x *DevicesUsage) Reset()

func (*DevicesUsage) String

func (x *DevicesUsage) String() string

type GetUsageRequest

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

GetUsageRequest is the request for GetUsage.

func (*GetUsageRequest) Descriptor deprecated

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

Deprecated: Use GetUsageRequest.ProtoReflect.Descriptor instead.

func (*GetUsageRequest) ProtoMessage

func (*GetUsageRequest) ProtoMessage()

func (*GetUsageRequest) ProtoReflect

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

func (*GetUsageRequest) Reset

func (x *GetUsageRequest) Reset()

func (*GetUsageRequest) String

func (x *GetUsageRequest) String() string

type GetUsageResponse

type GetUsageResponse struct {
	AccessRequests *AccessRequestsUsage `protobuf:"bytes,1,opt,name=access_requests,json=accessRequests,proto3" json:"access_requests,omitempty"`
	// Usage type of the underlying account.
	// UNLIMITED accounts have no usage limits, therefore any numbers should be
	// disconsidered for those accounts.
	AccountUsageType AccountUsageType `` /* 160-byte string literal not displayed */
	// DevicesUsage contains limits for trusted devices / Device Trust.
	DevicesUsage *DevicesUsage `protobuf:"bytes,3,opt,name=devices_usage,json=devicesUsage,proto3" json:"devices_usage,omitempty"`
	// contains filtered or unexported fields
}

GetUsageResponse is the response for GetUsage.

func (*GetUsageResponse) Descriptor deprecated

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

Deprecated: Use GetUsageResponse.ProtoReflect.Descriptor instead.

func (*GetUsageResponse) GetAccessRequests

func (x *GetUsageResponse) GetAccessRequests() *AccessRequestsUsage

func (*GetUsageResponse) GetAccountUsageType

func (x *GetUsageResponse) GetAccountUsageType() AccountUsageType

func (*GetUsageResponse) GetDevicesUsage

func (x *GetUsageResponse) GetDevicesUsage() *DevicesUsage

func (*GetUsageResponse) ProtoMessage

func (*GetUsageResponse) ProtoMessage()

func (*GetUsageResponse) ProtoReflect

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

func (*GetUsageResponse) Reset

func (x *GetUsageResponse) Reset()

func (*GetUsageResponse) String

func (x *GetUsageResponse) String() string

type ResourceUsageServiceClient

type ResourceUsageServiceClient interface {
	// GetUsage returns usage information for all limited resources.
	GetUsage(ctx context.Context, in *GetUsageRequest, opts ...grpc.CallOption) (*GetUsageResponse, error)
}

ResourceUsageServiceClient is the client API for ResourceUsageService 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 ResourceUsageServiceServer

type ResourceUsageServiceServer interface {
	// GetUsage returns usage information for all limited resources.
	GetUsage(context.Context, *GetUsageRequest) (*GetUsageResponse, error)
	// contains filtered or unexported methods
}

ResourceUsageServiceServer is the server API for ResourceUsageService service. All implementations must embed UnimplementedResourceUsageServiceServer for forward compatibility

type UnimplementedResourceUsageServiceServer

type UnimplementedResourceUsageServiceServer struct {
}

UnimplementedResourceUsageServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedResourceUsageServiceServer) GetUsage

type UnsafeResourceUsageServiceServer

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

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

Jump to

Keyboard shortcuts

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