billing

package module
v0.0.0-...-d079d68 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2025 License: MIT Imports: 12 Imported by: 7

Documentation

Index

Constants

View Source
const (
	CreditReservationService_GetOrganizationCreditsByWorkflow_FullMethodName = "/creditreservation.v1alpha.CreditReservationService/GetOrganizationCreditsByWorkflow"
	CreditReservationService_ReserveCredits_FullMethodName                   = "/creditreservation.v1alpha.CreditReservationService/ReserveCredits"
	CreditReservationService_SubmitWorkflowReceipt_FullMethodName            = "/creditreservation.v1alpha.CreditReservationService/SubmitWorkflowReceipt"
	CreditReservationService_GetWorkflowExecutionRates_FullMethodName        = "/creditreservation.v1alpha.CreditReservationService/GetWorkflowExecutionRates"
	CreditReservationService_CheckAggregationStatus_FullMethodName           = "/creditreservation.v1alpha.CreditReservationService/CheckAggregationStatus"
)

Variables

View Source
var (
	ResourceType_name = map[int32]string{
		0: "RESOURCE_TYPE_UNSPECIFIED",
		1: "RESOURCE_TYPE_CONSENSUS",
		2: "RESOURCE_TYPE_COMPUTE",
		4: "RESOURCE_TYPE_NETWORK",
		5: "RESOURCE_TYPE_TRIGGERS",
		6: "RESOURCE_TYPE_RPC_EVM",
	}
	ResourceType_value = map[string]int32{
		"RESOURCE_TYPE_UNSPECIFIED": 0,
		"RESOURCE_TYPE_CONSENSUS":   1,
		"RESOURCE_TYPE_COMPUTE":     2,
		"RESOURCE_TYPE_NETWORK":     4,
		"RESOURCE_TYPE_TRIGGERS":    5,
		"RESOURCE_TYPE_RPC_EVM":     6,
	}
)

Enum value maps for ResourceType.

View Source
var (
	MeasurementUnit_name = map[int32]string{
		0: "MEASUREMENT_UNIT_UNSPECIFIED",
		2: "MEASUREMENT_UNIT_BYTES",
		3: "MEASUREMENT_UNIT_MILLISECONDS",
		4: "MEASUREMENT_UNIT_OPERATIONS",
		5: "MEASUREMENT_UNIT_COST",
	}
	MeasurementUnit_value = map[string]int32{
		"MEASUREMENT_UNIT_UNSPECIFIED":  0,
		"MEASUREMENT_UNIT_BYTES":        2,
		"MEASUREMENT_UNIT_MILLISECONDS": 3,
		"MEASUREMENT_UNIT_OPERATIONS":   4,
		"MEASUREMENT_UNIT_COST":         5,
	}
)

Enum value maps for MeasurementUnit.

View Source
var (
	CallType_name = map[int32]string{
		0: "RESERVE_CREDITS",
		1: "WORKFLOW_RECEIPT",
	}
	CallType_value = map[string]int32{
		"RESERVE_CREDITS":  0,
		"WORKFLOW_RECEIPT": 1,
	}
)

Enum value maps for CallType.

View Source
var (
	AggregationStatus_name = map[int32]string{
		0: "COLLECTING",
		1: "AGGREGATION_MET",
	}
	AggregationStatus_value = map[string]int32{
		"COLLECTING":      0,
		"AGGREGATION_MET": 1,
	}
)

Enum value maps for AggregationStatus.

View Source
var (
	AggregationOutcome_name = map[int32]string{
		0: "SUCCESS",
		1: "FAILURE",
	}
	AggregationOutcome_value = map[string]int32{
		"SUCCESS": 0,
		"FAILURE": 1,
	}
)

Enum value maps for AggregationOutcome.

View Source
var CreditReservationService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "creditreservation.v1alpha.CreditReservationService",
	HandlerType: (*CreditReservationServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetOrganizationCreditsByWorkflow",
			Handler:    _CreditReservationService_GetOrganizationCreditsByWorkflow_Handler,
		},
		{
			MethodName: "ReserveCredits",
			Handler:    _CreditReservationService_ReserveCredits_Handler,
		},
		{
			MethodName: "SubmitWorkflowReceipt",
			Handler:    _CreditReservationService_SubmitWorkflowReceipt_Handler,
		},
		{
			MethodName: "GetWorkflowExecutionRates",
			Handler:    _CreditReservationService_GetWorkflowExecutionRates_Handler,
		},
		{
			MethodName: "CheckAggregationStatus",
			Handler:    _CreditReservationService_CheckAggregationStatus_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "creditreservation/v1alpha/credit_reservation_service.proto",
}

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

View Source
var File_creditreservation_v1alpha_credit_reservation_service_proto protoreflect.FileDescriptor

Functions

func RegisterCreditReservationServiceServer

func RegisterCreditReservationServiceServer(s grpc.ServiceRegistrar, srv CreditReservationServiceServer)

Types

type AggregationOutcome

type AggregationOutcome int32

AggregationOutcome reflects the two possible outcomes of aggregation

const (
	AggregationOutcome_SUCCESS AggregationOutcome = 0
	AggregationOutcome_FAILURE AggregationOutcome = 1
)

func (AggregationOutcome) Descriptor

func (AggregationOutcome) Enum

func (AggregationOutcome) EnumDescriptor deprecated

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

Deprecated: Use AggregationOutcome.Descriptor instead.

func (AggregationOutcome) Number

func (AggregationOutcome) String

func (x AggregationOutcome) String() string

func (AggregationOutcome) Type

type AggregationStatus

type AggregationStatus int32

AggregationStatus reflects the two possible states of aggregation

const (
	AggregationStatus_COLLECTING      AggregationStatus = 0
	AggregationStatus_AGGREGATION_MET AggregationStatus = 1
)

func (AggregationStatus) Descriptor

func (AggregationStatus) Enum

func (AggregationStatus) EnumDescriptor deprecated

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

Deprecated: Use AggregationStatus.Descriptor instead.

func (AggregationStatus) Number

func (AggregationStatus) String

func (x AggregationStatus) String() string

func (AggregationStatus) Type

type CallType

type CallType int32

CallType signifies the two billing service calls with aggregation

const (
	CallType_RESERVE_CREDITS  CallType = 0
	CallType_WORKFLOW_RECEIPT CallType = 1
)

func (CallType) Descriptor

func (CallType) Descriptor() protoreflect.EnumDescriptor

func (CallType) Enum

func (x CallType) Enum() *CallType

func (CallType) EnumDescriptor deprecated

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

Deprecated: Use CallType.Descriptor instead.

func (CallType) Number

func (x CallType) Number() protoreflect.EnumNumber

func (CallType) String

func (x CallType) String() string

func (CallType) Type

type CheckAggregationStatusRequest

type CheckAggregationStatusRequest struct {
	WorkflowId                    string   `protobuf:"bytes,1,opt,name=WorkflowId,proto3" json:"WorkflowId,omitempty"`
	WorkflowExecutionId           string   `protobuf:"bytes,2,opt,name=WorkflowExecutionId,proto3" json:"WorkflowExecutionId,omitempty"`
	WorkflowRegistryChainSelector uint64   `protobuf:"varint,3,opt,name=WorkflowRegistryChainSelector,proto3" json:"WorkflowRegistryChainSelector,omitempty"`
	CallType                      CallType `protobuf:"varint,4,opt,name=CallType,proto3,enum=creditreservation.v1alpha.CallType" json:"CallType,omitempty"` // RESERVE_CREDITS, WORKFLOW_RECEIPT
	// contains filtered or unexported fields
}

func (*CheckAggregationStatusRequest) Descriptor deprecated

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

Deprecated: Use CheckAggregationStatusRequest.ProtoReflect.Descriptor instead.

func (*CheckAggregationStatusRequest) GetCallType

func (x *CheckAggregationStatusRequest) GetCallType() CallType

func (*CheckAggregationStatusRequest) GetWorkflowExecutionId

func (x *CheckAggregationStatusRequest) GetWorkflowExecutionId() string

func (*CheckAggregationStatusRequest) GetWorkflowId

func (x *CheckAggregationStatusRequest) GetWorkflowId() string

func (*CheckAggregationStatusRequest) GetWorkflowRegistryChainSelector

func (x *CheckAggregationStatusRequest) GetWorkflowRegistryChainSelector() uint64

func (*CheckAggregationStatusRequest) ProtoMessage

func (*CheckAggregationStatusRequest) ProtoMessage()

func (*CheckAggregationStatusRequest) ProtoReflect

func (*CheckAggregationStatusRequest) Reset

func (x *CheckAggregationStatusRequest) Reset()

func (*CheckAggregationStatusRequest) String

type CheckAggregationStatusResponse

type CheckAggregationStatusResponse struct {
	NOracles          uint64            `protobuf:"varint,1,opt,name=NOracles,proto3" json:"NOracles,omitempty"`               // Number of oracles participating
	FFault            uint64            `protobuf:"varint,2,opt,name=FFault,proto3" json:"FFault,omitempty"`                   // 3*f + 1 <= n
	QuorumThreshold   uint64            `protobuf:"varint,3,opt,name=QuorumThreshold,proto3" json:"QuorumThreshold,omitempty"` // e.g. 2*f + 1
	ReportsReceived   uint64            `protobuf:"varint,4,opt,name=ReportsReceived,proto3" json:"ReportsReceived,omitempty"` // current number of submitted reserve and reports
	AggregationStatus AggregationStatus ``                                                                                     // COLLECTING, AGGREGATION_MET
	/* 137-byte string literal not displayed */
	Outcome AggregationOutcome `protobuf:"varint,6,opt,name=Outcome,proto3,enum=creditreservation.v1alpha.AggregationOutcome" json:"Outcome,omitempty"` // SUCCESS, FAILURE
	// contains filtered or unexported fields
}

func (*CheckAggregationStatusResponse) Descriptor deprecated

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

Deprecated: Use CheckAggregationStatusResponse.ProtoReflect.Descriptor instead.

func (*CheckAggregationStatusResponse) GetAggregationStatus

func (x *CheckAggregationStatusResponse) GetAggregationStatus() AggregationStatus

func (*CheckAggregationStatusResponse) GetFFault

func (x *CheckAggregationStatusResponse) GetFFault() uint64

func (*CheckAggregationStatusResponse) GetNOracles

func (x *CheckAggregationStatusResponse) GetNOracles() uint64

func (*CheckAggregationStatusResponse) GetOutcome

func (*CheckAggregationStatusResponse) GetQuorumThreshold

func (x *CheckAggregationStatusResponse) GetQuorumThreshold() uint64

func (*CheckAggregationStatusResponse) GetReportsReceived

func (x *CheckAggregationStatusResponse) GetReportsReceived() uint64

func (*CheckAggregationStatusResponse) ProtoMessage

func (*CheckAggregationStatusResponse) ProtoMessage()

func (*CheckAggregationStatusResponse) ProtoReflect

func (*CheckAggregationStatusResponse) Reset

func (x *CheckAggregationStatusResponse) Reset()

func (*CheckAggregationStatusResponse) String

type CreditReservationServiceClient

type CreditReservationServiceClient interface {
	GetOrganizationCreditsByWorkflow(ctx context.Context, in *GetOrganizationCreditsByWorkflowRequest, opts ...grpc.CallOption) (*GetOrganizationCreditsByWorkflowResponse, error)
	ReserveCredits(ctx context.Context, in *ReserveCreditsRequest, opts ...grpc.CallOption) (*ReserveCreditsResponse, error)
	SubmitWorkflowReceipt(ctx context.Context, in *SubmitWorkflowReceiptRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	GetWorkflowExecutionRates(ctx context.Context, in *GetWorkflowExecutionRatesRequest, opts ...grpc.CallOption) (*GetWorkflowExecutionRatesResponse, error)
	CheckAggregationStatus(ctx context.Context, in *CheckAggregationStatusRequest, opts ...grpc.CallOption) (*CheckAggregationStatusResponse, error)
}

CreditReservationServiceClient is the client API for CreditReservationService 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 CreditReservationServiceServer

type CreditReservationServiceServer interface {
	GetOrganizationCreditsByWorkflow(context.Context, *GetOrganizationCreditsByWorkflowRequest) (*GetOrganizationCreditsByWorkflowResponse, error)
	ReserveCredits(context.Context, *ReserveCreditsRequest) (*ReserveCreditsResponse, error)
	SubmitWorkflowReceipt(context.Context, *SubmitWorkflowReceiptRequest) (*emptypb.Empty, error)
	GetWorkflowExecutionRates(context.Context, *GetWorkflowExecutionRatesRequest) (*GetWorkflowExecutionRatesResponse, error)
	CheckAggregationStatus(context.Context, *CheckAggregationStatusRequest) (*CheckAggregationStatusResponse, error)
	// contains filtered or unexported methods
}

CreditReservationServiceServer is the server API for CreditReservationService service. All implementations must embed UnimplementedCreditReservationServiceServer for forward compatibility.

type GetOrganizationCreditsByWorkflowRequest

type GetOrganizationCreditsByWorkflowRequest struct {
	WorkflowOwner                 string `protobuf:"bytes,1,opt,name=workflow_owner,json=workflowOwner,proto3" json:"workflow_owner,omitempty"`
	WorkflowRegistryAddress       string `` /* 132-byte string literal not displayed */
	WorkflowRegistryChainSelector uint64 `` /* 153-byte string literal not displayed */
	// contains filtered or unexported fields
}

Request by workflow to look up org credits.

func (*GetOrganizationCreditsByWorkflowRequest) Descriptor deprecated

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

Deprecated: Use GetOrganizationCreditsByWorkflowRequest.ProtoReflect.Descriptor instead.

func (*GetOrganizationCreditsByWorkflowRequest) GetWorkflowOwner

func (x *GetOrganizationCreditsByWorkflowRequest) GetWorkflowOwner() string

func (*GetOrganizationCreditsByWorkflowRequest) GetWorkflowRegistryAddress

func (x *GetOrganizationCreditsByWorkflowRequest) GetWorkflowRegistryAddress() string

func (*GetOrganizationCreditsByWorkflowRequest) GetWorkflowRegistryChainSelector

func (x *GetOrganizationCreditsByWorkflowRequest) GetWorkflowRegistryChainSelector() uint64

func (*GetOrganizationCreditsByWorkflowRequest) ProtoMessage

func (*GetOrganizationCreditsByWorkflowRequest) ProtoReflect

func (*GetOrganizationCreditsByWorkflowRequest) Reset

func (*GetOrganizationCreditsByWorkflowRequest) String

type GetOrganizationCreditsByWorkflowResponse

type GetOrganizationCreditsByWorkflowResponse struct {
	OrganizationId string               `protobuf:"bytes,1,opt,name=organization_id,json=organizationId,proto3" json:"organization_id,omitempty"`
	Credits        *OrganizationCredits `protobuf:"bytes,2,opt,name=credits,proto3" json:"credits,omitempty"`
	// contains filtered or unexported fields
}

Response carrying org ID and credits.

func (*GetOrganizationCreditsByWorkflowResponse) Descriptor deprecated

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

Deprecated: Use GetOrganizationCreditsByWorkflowResponse.ProtoReflect.Descriptor instead.

func (*GetOrganizationCreditsByWorkflowResponse) GetCredits

func (*GetOrganizationCreditsByWorkflowResponse) GetOrganizationId

func (x *GetOrganizationCreditsByWorkflowResponse) GetOrganizationId() string

func (*GetOrganizationCreditsByWorkflowResponse) ProtoMessage

func (*GetOrganizationCreditsByWorkflowResponse) ProtoReflect

func (*GetOrganizationCreditsByWorkflowResponse) Reset

func (*GetOrganizationCreditsByWorkflowResponse) String

type GetWorkflowExecutionRatesRequest

type GetWorkflowExecutionRatesRequest struct {
	WorkflowOwner           string `protobuf:"bytes,1,opt,name=workflow_owner,json=workflowOwner,proto3" json:"workflow_owner,omitempty"`
	WorkflowRegistryAddress string `` /* 132-byte string literal not displayed */
	ChainSelector           uint64 `protobuf:"varint,3,opt,name=chain_selector,json=chainSelector,proto3" json:"chain_selector,omitempty"`
	WorkflowExecutionId     string `protobuf:"bytes,4,opt,name=workflow_execution_id,json=workflowExecutionId,proto3" json:"workflow_execution_id,omitempty"`
	// contains filtered or unexported fields
}

Get the rate card for an execution

func (*GetWorkflowExecutionRatesRequest) Descriptor deprecated

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

Deprecated: Use GetWorkflowExecutionRatesRequest.ProtoReflect.Descriptor instead.

func (*GetWorkflowExecutionRatesRequest) GetChainSelector

func (x *GetWorkflowExecutionRatesRequest) GetChainSelector() uint64

func (*GetWorkflowExecutionRatesRequest) GetWorkflowExecutionId

func (x *GetWorkflowExecutionRatesRequest) GetWorkflowExecutionId() string

func (*GetWorkflowExecutionRatesRequest) GetWorkflowOwner

func (x *GetWorkflowExecutionRatesRequest) GetWorkflowOwner() string

func (*GetWorkflowExecutionRatesRequest) GetWorkflowRegistryAddress

func (x *GetWorkflowExecutionRatesRequest) GetWorkflowRegistryAddress() string

func (*GetWorkflowExecutionRatesRequest) ProtoMessage

func (*GetWorkflowExecutionRatesRequest) ProtoMessage()

func (*GetWorkflowExecutionRatesRequest) ProtoReflect

func (*GetWorkflowExecutionRatesRequest) Reset

func (*GetWorkflowExecutionRatesRequest) String

type GetWorkflowExecutionRatesResponse

type GetWorkflowExecutionRatesResponse struct {
	OrganizationId string      `protobuf:"bytes,1,opt,name=organization_id,json=organizationId,proto3" json:"organization_id,omitempty"`
	RateCards      []*RateCard `protobuf:"bytes,2,rep,name=rate_cards,json=rateCards,proto3" json:"rate_cards,omitempty"`
	// chain selector -> gas tokens per credit
	GasTokensPerCredit map[uint64]string `` /* 194-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*GetWorkflowExecutionRatesResponse) Descriptor deprecated

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

Deprecated: Use GetWorkflowExecutionRatesResponse.ProtoReflect.Descriptor instead.

func (*GetWorkflowExecutionRatesResponse) GetGasTokensPerCredit

func (x *GetWorkflowExecutionRatesResponse) GetGasTokensPerCredit() map[uint64]string

func (*GetWorkflowExecutionRatesResponse) GetOrganizationId

func (x *GetWorkflowExecutionRatesResponse) GetOrganizationId() string

func (*GetWorkflowExecutionRatesResponse) GetRateCards

func (x *GetWorkflowExecutionRatesResponse) GetRateCards() []*RateCard

func (*GetWorkflowExecutionRatesResponse) ProtoMessage

func (*GetWorkflowExecutionRatesResponse) ProtoMessage()

func (*GetWorkflowExecutionRatesResponse) ProtoReflect

func (*GetWorkflowExecutionRatesResponse) Reset

func (*GetWorkflowExecutionRatesResponse) String

type MeasurementUnit

type MeasurementUnit int32

MeasurementUnit corresponds to billing.measurement_unit in Postgres.

const (
	// Unknown / unset.
	MeasurementUnit_MEASUREMENT_UNIT_UNSPECIFIED MeasurementUnit = 0
	// Bytes (CONSENSUS).
	MeasurementUnit_MEASUREMENT_UNIT_BYTES MeasurementUnit = 2
	// Milliseconds (COMPUTE).
	MeasurementUnit_MEASUREMENT_UNIT_MILLISECONDS MeasurementUnit = 3
	// Operations count (ALERTS, EVENTS, CHAIN_CALLS, TRIGGERS).
	MeasurementUnit_MEASUREMENT_UNIT_OPERATIONS MeasurementUnit = 4
	// Cost (GAS).
	MeasurementUnit_MEASUREMENT_UNIT_COST MeasurementUnit = 5
)

func (MeasurementUnit) Descriptor

func (MeasurementUnit) Enum

func (x MeasurementUnit) Enum() *MeasurementUnit

func (MeasurementUnit) EnumDescriptor deprecated

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

Deprecated: Use MeasurementUnit.Descriptor instead.

func (MeasurementUnit) Number

func (MeasurementUnit) String

func (x MeasurementUnit) String() string

func (MeasurementUnit) Type

type OrganizationCredits

type OrganizationCredits struct {
	Credits         string                 `protobuf:"bytes,1,opt,name=credits,proto3" json:"credits,omitempty"`
	CreditsReserved string                 `protobuf:"bytes,2,opt,name=credits_reserved,json=creditsReserved,proto3" json:"credits_reserved,omitempty"`
	CreatedAt       *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	UpdatedAt       *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
	// contains filtered or unexported fields
}

Organization’s credit balances.

func (*OrganizationCredits) Descriptor deprecated

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

Deprecated: Use OrganizationCredits.ProtoReflect.Descriptor instead.

func (*OrganizationCredits) GetCreatedAt

func (x *OrganizationCredits) GetCreatedAt() *timestamppb.Timestamp

func (*OrganizationCredits) GetCredits

func (x *OrganizationCredits) GetCredits() string

func (*OrganizationCredits) GetCreditsReserved

func (x *OrganizationCredits) GetCreditsReserved() string

func (*OrganizationCredits) GetUpdatedAt

func (x *OrganizationCredits) GetUpdatedAt() *timestamppb.Timestamp

func (*OrganizationCredits) ProtoMessage

func (*OrganizationCredits) ProtoMessage()

func (*OrganizationCredits) ProtoReflect

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

func (*OrganizationCredits) Reset

func (x *OrganizationCredits) Reset()

func (*OrganizationCredits) String

func (x *OrganizationCredits) String() string

type RateCard

type RateCard struct {
	ResourceType    ResourceType           `` /* 142-byte string literal not displayed */
	MeasurementUnit MeasurementUnit        `` /* 154-byte string literal not displayed */
	UnitsPerCredit  string                 `protobuf:"bytes,3,opt,name=units_per_credit,json=unitsPerCredit,proto3" json:"units_per_credit,omitempty"`
	ChangedBy       string                 `protobuf:"bytes,4,opt,name=changed_by,json=changedBy,proto3" json:"changed_by,omitempty"`
	CreatedAt       *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	UpdatedAt       *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
	// contains filtered or unexported fields
}

A single rate‐card entry.

func (*RateCard) Descriptor deprecated

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

Deprecated: Use RateCard.ProtoReflect.Descriptor instead.

func (*RateCard) GetChangedBy

func (x *RateCard) GetChangedBy() string

func (*RateCard) GetCreatedAt

func (x *RateCard) GetCreatedAt() *timestamppb.Timestamp

func (*RateCard) GetMeasurementUnit

func (x *RateCard) GetMeasurementUnit() MeasurementUnit

func (*RateCard) GetResourceType

func (x *RateCard) GetResourceType() ResourceType

func (*RateCard) GetUnitsPerCredit

func (x *RateCard) GetUnitsPerCredit() string

func (*RateCard) GetUpdatedAt

func (x *RateCard) GetUpdatedAt() *timestamppb.Timestamp

func (*RateCard) ProtoMessage

func (*RateCard) ProtoMessage()

func (*RateCard) ProtoReflect

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

func (*RateCard) Reset

func (x *RateCard) Reset()

func (*RateCard) String

func (x *RateCard) String() string

type ReserveCreditsRequest

type ReserveCreditsRequest struct {
	WorkflowOwner                 string  `protobuf:"bytes,1,opt,name=workflow_owner,json=workflowOwner,proto3" json:"workflow_owner,omitempty"`
	WorkflowRegistryAddress       string  `` /* 132-byte string literal not displayed */
	WorkflowRegistryChainSelector uint64  `` /* 153-byte string literal not displayed */
	WorkflowId                    string  `protobuf:"bytes,4,opt,name=workflow_id,json=workflowId,proto3" json:"workflow_id,omitempty"`
	WorkflowExecutionId           string  `protobuf:"bytes,5,opt,name=workflow_execution_id,json=workflowExecutionId,proto3" json:"workflow_execution_id,omitempty"`
	Credits                       *string `protobuf:"bytes,6,opt,name=credits,proto3,oneof" json:"credits,omitempty"`
	// contains filtered or unexported fields
}

Reserve credits for a workflow execution.

func (*ReserveCreditsRequest) Descriptor deprecated

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

Deprecated: Use ReserveCreditsRequest.ProtoReflect.Descriptor instead.

func (*ReserveCreditsRequest) GetCredits

func (x *ReserveCreditsRequest) GetCredits() string

func (*ReserveCreditsRequest) GetWorkflowExecutionId

func (x *ReserveCreditsRequest) GetWorkflowExecutionId() string

func (*ReserveCreditsRequest) GetWorkflowId

func (x *ReserveCreditsRequest) GetWorkflowId() string

func (*ReserveCreditsRequest) GetWorkflowOwner

func (x *ReserveCreditsRequest) GetWorkflowOwner() string

func (*ReserveCreditsRequest) GetWorkflowRegistryAddress

func (x *ReserveCreditsRequest) GetWorkflowRegistryAddress() string

func (*ReserveCreditsRequest) GetWorkflowRegistryChainSelector

func (x *ReserveCreditsRequest) GetWorkflowRegistryChainSelector() uint64

func (*ReserveCreditsRequest) ProtoMessage

func (*ReserveCreditsRequest) ProtoMessage()

func (*ReserveCreditsRequest) ProtoReflect

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

func (*ReserveCreditsRequest) Reset

func (x *ReserveCreditsRequest) Reset()

func (*ReserveCreditsRequest) String

func (x *ReserveCreditsRequest) String() string

type ReserveCreditsResponse

type ReserveCreditsResponse struct {
	OrganizationId string      `protobuf:"bytes,1,opt,name=organization_id,json=organizationId,proto3" json:"organization_id,omitempty"`
	Success        bool        `protobuf:"varint,2,opt,name=success,proto3" json:"success,omitempty"`
	Credits        string      `protobuf:"bytes,3,opt,name=credits,proto3" json:"credits,omitempty"`
	RateCards      []*RateCard `protobuf:"bytes,4,rep,name=rate_cards,json=rateCards,proto3" json:"rate_cards,omitempty"`
	// contains filtered or unexported fields
}

func (*ReserveCreditsResponse) Descriptor deprecated

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

Deprecated: Use ReserveCreditsResponse.ProtoReflect.Descriptor instead.

func (*ReserveCreditsResponse) GetCredits

func (x *ReserveCreditsResponse) GetCredits() string

func (*ReserveCreditsResponse) GetOrganizationId

func (x *ReserveCreditsResponse) GetOrganizationId() string

func (*ReserveCreditsResponse) GetRateCards

func (x *ReserveCreditsResponse) GetRateCards() []*RateCard

func (*ReserveCreditsResponse) GetSuccess

func (x *ReserveCreditsResponse) GetSuccess() bool

func (*ReserveCreditsResponse) ProtoMessage

func (*ReserveCreditsResponse) ProtoMessage()

func (*ReserveCreditsResponse) ProtoReflect

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

func (*ReserveCreditsResponse) Reset

func (x *ReserveCreditsResponse) Reset()

func (*ReserveCreditsResponse) String

func (x *ReserveCreditsResponse) String() string

type ResourceType

type ResourceType int32

ResourceType corresponds to billing.resource_type in Postgres.

const (
	// Unknown / unset.
	ResourceType_RESOURCE_TYPE_UNSPECIFIED ResourceType = 0
	// Consensus bandwidth.
	ResourceType_RESOURCE_TYPE_CONSENSUS ResourceType = 1
	// Compute time in milliseconds.
	ResourceType_RESOURCE_TYPE_COMPUTE ResourceType = 2
	// HTTP bandwidth.
	ResourceType_RESOURCE_TYPE_NETWORK ResourceType = 4
	// Trigger operations count.
	ResourceType_RESOURCE_TYPE_TRIGGERS ResourceType = 5
	ResourceType_RESOURCE_TYPE_RPC_EVM  ResourceType = 6
)

func (ResourceType) Descriptor

func (ResourceType) Enum

func (x ResourceType) Enum() *ResourceType

func (ResourceType) EnumDescriptor deprecated

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

Deprecated: Use ResourceType.Descriptor instead.

func (ResourceType) Number

func (ResourceType) String

func (x ResourceType) String() string

func (ResourceType) Type

type SubmitWorkflowReceiptRequest

type SubmitWorkflowReceiptRequest struct {
	WorkflowOwner                 string                 `protobuf:"bytes,1,opt,name=workflow_owner,json=workflowOwner,proto3" json:"workflow_owner,omitempty"`
	WorkflowRegistryAddress       string                 `` /* 132-byte string literal not displayed */
	WorkflowRegistryChainSelector uint64                 `` /* 153-byte string literal not displayed */
	WorkflowId                    string                 `protobuf:"bytes,4,opt,name=workflow_id,json=workflowId,proto3" json:"workflow_id,omitempty"`
	WorkflowExecutionId           string                 `protobuf:"bytes,5,opt,name=workflow_execution_id,json=workflowExecutionId,proto3" json:"workflow_execution_id,omitempty"`
	Metering                      *events.MeteringReport `protobuf:"bytes,6,opt,name=metering,proto3" json:"metering,omitempty"`
	CreditsConsumed               string                 `protobuf:"bytes,7,opt,name=credits_consumed,json=creditsConsumed,proto3" json:"credits_consumed,omitempty"`
	// contains filtered or unexported fields
}

Submit a workflow receipt.

func (*SubmitWorkflowReceiptRequest) Descriptor deprecated

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

Deprecated: Use SubmitWorkflowReceiptRequest.ProtoReflect.Descriptor instead.

func (*SubmitWorkflowReceiptRequest) GetCreditsConsumed

func (x *SubmitWorkflowReceiptRequest) GetCreditsConsumed() string

func (*SubmitWorkflowReceiptRequest) GetMetering

func (*SubmitWorkflowReceiptRequest) GetWorkflowExecutionId

func (x *SubmitWorkflowReceiptRequest) GetWorkflowExecutionId() string

func (*SubmitWorkflowReceiptRequest) GetWorkflowId

func (x *SubmitWorkflowReceiptRequest) GetWorkflowId() string

func (*SubmitWorkflowReceiptRequest) GetWorkflowOwner

func (x *SubmitWorkflowReceiptRequest) GetWorkflowOwner() string

func (*SubmitWorkflowReceiptRequest) GetWorkflowRegistryAddress

func (x *SubmitWorkflowReceiptRequest) GetWorkflowRegistryAddress() string

func (*SubmitWorkflowReceiptRequest) GetWorkflowRegistryChainSelector

func (x *SubmitWorkflowReceiptRequest) GetWorkflowRegistryChainSelector() uint64

func (*SubmitWorkflowReceiptRequest) ProtoMessage

func (*SubmitWorkflowReceiptRequest) ProtoMessage()

func (*SubmitWorkflowReceiptRequest) ProtoReflect

func (*SubmitWorkflowReceiptRequest) Reset

func (x *SubmitWorkflowReceiptRequest) Reset()

func (*SubmitWorkflowReceiptRequest) String

type UnimplementedCreditReservationServiceServer

type UnimplementedCreditReservationServiceServer struct{}

UnimplementedCreditReservationServiceServer 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 (UnimplementedCreditReservationServiceServer) CheckAggregationStatus

func (UnimplementedCreditReservationServiceServer) ReserveCredits

func (UnimplementedCreditReservationServiceServer) SubmitWorkflowReceipt

type UnsafeCreditReservationServiceServer

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

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

Jump to

Keyboard shortcuts

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