apiusage

package
v2.6.0 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	APIUsage_Type_name = map[int32]string{
		0: "UNKNOWN_TYPE",
		1: "FACTOR3s",
		2: "PIR",
		3: "API_TRANSMIT",
		4: "FILE_TRANSFER",
	}
	APIUsage_Type_value = map[string]int32{
		"UNKNOWN_TYPE":  0,
		"FACTOR3s":      1,
		"PIR":           2,
		"API_TRANSMIT":  3,
		"FILE_TRANSFER": 4,
	}
)

Enum value maps for APIUsage_Type.

View Source
var (
	APIUsage_Status_name = map[int32]string{
		0: "UNKNOWN_STATUS",
		1: "SUCCESS",
		2: "FAILED",
	}
	APIUsage_Status_value = map[string]int32{
		"UNKNOWN_STATUS": 0,
		"SUCCESS":        1,
		"FAILED":         2,
	}
)

Enum value maps for APIUsage_Status.

View Source
var (
	UpsertAPIUsageReceiverResponse_Status_name = map[int32]string{
		0: "UNKNOWN_STATUS",
		1: "SUCCESS",
		2: "FAILED",
	}
	UpsertAPIUsageReceiverResponse_Status_value = map[string]int32{
		"UNKNOWN_STATUS": 0,
		"SUCCESS":        1,
		"FAILED":         2,
	}
)

Enum value maps for UpsertAPIUsageReceiverResponse_Status.

View Source
var (
	APIUsageNotifyResponse_Status_name = map[int32]string{
		0: "UNKNOWN_STATUS",
		1: "SUCCESS",
		2: "FAILED",
	}
	APIUsageNotifyResponse_Status_value = map[string]int32{
		"UNKNOWN_STATUS": 0,
		"SUCCESS":        1,
		"FAILED":         2,
	}
)

Enum value maps for APIUsageNotifyResponse_Status.

View Source
var File_sudo_api_usage_api_usage_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type APIUsage

type APIUsage struct {
	Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// 与innerID共同组成unique key
	RequestId string `protobuf:"bytes,2,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
	// client端的innerID是0, server是1、2以此类推
	InnerId int32  `protobuf:"varint,3,opt,name=inner_id,json=innerId,proto3" json:"inner_id,omitempty"`
	PartyId string `protobuf:"bytes,4,opt,name=party_id,json=partyId,proto3" json:"party_id,omitempty"`
	// 发起调用者,client端记录userID,server端记录clientPartyID
	Caller string `protobuf:"bytes,5,opt,name=caller,proto3" json:"caller,omitempty"`
	// 对于三要素,APIID的值是ServiceID
	ApiId   string        `protobuf:"bytes,6,opt,name=api_id,json=apiId,proto3" json:"api_id,omitempty"`
	ApiPath string        `protobuf:"bytes,7,opt,name=api_path,json=apiPath,proto3" json:"api_path,omitempty"`
	Type    APIUsage_Type `protobuf:"varint,8,opt,name=type,proto3,enum=sudo.protobuf.api_usage.APIUsage_Type" json:"type,omitempty"`
	// 对于不同type的API, 个性化属性保存在AdditionalInfo
	AdditionalInfo *AdditionalInfo `protobuf:"bytes,9,opt,name=additional_info,json=additionalInfo,proto3" json:"additional_info,omitempty"`
	Status         APIUsage_Status `protobuf:"varint,10,opt,name=status,proto3,enum=sudo.protobuf.api_usage.APIUsage_Status" json:"status,omitempty"`
	// 如果失败,期待可以上报失败原因
	Message   string `protobuf:"bytes,11,opt,name=message,proto3" json:"message,omitempty"`
	CreatedTs int64  `protobuf:"varint,12,opt,name=created_ts,json=createdTs,proto3" json:"created_ts,omitempty"`
	// 服务端收到请求的时间(精确到毫秒)
	StartTime int64 `protobuf:"varint,13,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"`
	// 服务端收到请求的时间(精确到毫秒)
	EndTime int64 `protobuf:"varint,14,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"`
	// contains filtered or unexported fields
}

func (*APIUsage) Descriptor deprecated

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

Deprecated: Use APIUsage.ProtoReflect.Descriptor instead.

func (*APIUsage) GetAdditionalInfo

func (x *APIUsage) GetAdditionalInfo() *AdditionalInfo

func (*APIUsage) GetApiId

func (x *APIUsage) GetApiId() string

func (*APIUsage) GetApiPath

func (x *APIUsage) GetApiPath() string

func (*APIUsage) GetCaller

func (x *APIUsage) GetCaller() string

func (*APIUsage) GetCreatedTs

func (x *APIUsage) GetCreatedTs() int64

func (*APIUsage) GetEndTime

func (x *APIUsage) GetEndTime() int64

func (*APIUsage) GetId

func (x *APIUsage) GetId() uint64

func (*APIUsage) GetInnerId

func (x *APIUsage) GetInnerId() int32

func (*APIUsage) GetMessage

func (x *APIUsage) GetMessage() string

func (*APIUsage) GetPartyId

func (x *APIUsage) GetPartyId() string

func (*APIUsage) GetRequestId

func (x *APIUsage) GetRequestId() string

func (*APIUsage) GetStartTime

func (x *APIUsage) GetStartTime() int64

func (*APIUsage) GetStatus

func (x *APIUsage) GetStatus() APIUsage_Status

func (*APIUsage) GetType

func (x *APIUsage) GetType() APIUsage_Type

func (*APIUsage) ProtoMessage

func (*APIUsage) ProtoMessage()

func (*APIUsage) ProtoReflect

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

func (*APIUsage) Reset

func (x *APIUsage) Reset()

func (*APIUsage) String

func (x *APIUsage) String() string

type APIUsageNotifyResponse

type APIUsageNotifyResponse struct {
	Status APIUsageNotifyResponse_Status `protobuf:"varint,1,opt,name=status,proto3,enum=sudo.protobuf.api_usage.APIUsageNotifyResponse_Status" json:"status,omitempty"`
	// 异常时返回原因
	Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`
	// contains filtered or unexported fields
}

func (*APIUsageNotifyResponse) Descriptor deprecated

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

Deprecated: Use APIUsageNotifyResponse.ProtoReflect.Descriptor instead.

func (*APIUsageNotifyResponse) GetMsg

func (x *APIUsageNotifyResponse) GetMsg() string

func (*APIUsageNotifyResponse) GetStatus

func (*APIUsageNotifyResponse) ProtoMessage

func (*APIUsageNotifyResponse) ProtoMessage()

func (*APIUsageNotifyResponse) ProtoReflect

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

func (*APIUsageNotifyResponse) Reset

func (x *APIUsageNotifyResponse) Reset()

func (*APIUsageNotifyResponse) String

func (x *APIUsageNotifyResponse) String() string

type APIUsageNotifyResponse_Status

type APIUsageNotifyResponse_Status int32
const (
	APIUsageNotifyResponse_UNKNOWN_STATUS APIUsageNotifyResponse_Status = 0
	APIUsageNotifyResponse_SUCCESS        APIUsageNotifyResponse_Status = 1
	APIUsageNotifyResponse_FAILED         APIUsageNotifyResponse_Status = 2
)

func (APIUsageNotifyResponse_Status) Descriptor

func (APIUsageNotifyResponse_Status) Enum

func (APIUsageNotifyResponse_Status) EnumDescriptor deprecated

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

Deprecated: Use APIUsageNotifyResponse_Status.Descriptor instead.

func (APIUsageNotifyResponse_Status) Number

func (APIUsageNotifyResponse_Status) String

func (APIUsageNotifyResponse_Status) Type

type APIUsage_Status

type APIUsage_Status int32
const (
	APIUsage_UNKNOWN_STATUS APIUsage_Status = 0
	APIUsage_SUCCESS        APIUsage_Status = 1
	APIUsage_FAILED         APIUsage_Status = 2
)

func (APIUsage_Status) Descriptor

func (APIUsage_Status) Enum

func (x APIUsage_Status) Enum() *APIUsage_Status

func (APIUsage_Status) EnumDescriptor deprecated

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

Deprecated: Use APIUsage_Status.Descriptor instead.

func (APIUsage_Status) Number

func (APIUsage_Status) String

func (x APIUsage_Status) String() string

func (APIUsage_Status) Type

type APIUsage_Type

type APIUsage_Type int32
const (
	APIUsage_UNKNOWN_TYPE  APIUsage_Type = 0
	APIUsage_FACTOR3s      APIUsage_Type = 1
	APIUsage_PIR           APIUsage_Type = 2
	APIUsage_API_TRANSMIT  APIUsage_Type = 3
	APIUsage_FILE_TRANSFER APIUsage_Type = 4
)

func (APIUsage_Type) Descriptor

func (APIUsage_Type) Enum

func (x APIUsage_Type) Enum() *APIUsage_Type

func (APIUsage_Type) EnumDescriptor deprecated

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

Deprecated: Use APIUsage_Type.Descriptor instead.

func (APIUsage_Type) Number

func (APIUsage_Type) String

func (x APIUsage_Type) String() string

func (APIUsage_Type) Type

type AdditionalInfo

type AdditionalInfo struct {

	// Types that are assignable to Info:
	//	*AdditionalInfo_Factor3S
	//	*AdditionalInfo_Pir
	//	*AdditionalInfo_FileTransfer
	Info isAdditionalInfo_Info `protobuf_oneof:"info"`
	// contains filtered or unexported fields
}

func (*AdditionalInfo) Descriptor deprecated

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

Deprecated: Use AdditionalInfo.ProtoReflect.Descriptor instead.

func (*AdditionalInfo) GetFactor3S

func (x *AdditionalInfo) GetFactor3S() *Factor3SAdditionalInfo

func (*AdditionalInfo) GetFileTransfer

func (x *AdditionalInfo) GetFileTransfer() *FileTransferAdditionalInfo

func (*AdditionalInfo) GetInfo

func (m *AdditionalInfo) GetInfo() isAdditionalInfo_Info

func (*AdditionalInfo) GetPir

func (x *AdditionalInfo) GetPir() *PIRAdditionalInfo

func (*AdditionalInfo) ProtoMessage

func (*AdditionalInfo) ProtoMessage()

func (*AdditionalInfo) ProtoReflect

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

func (*AdditionalInfo) Reset

func (x *AdditionalInfo) Reset()

func (*AdditionalInfo) String

func (x *AdditionalInfo) String() string

type AdditionalInfo_Factor3S

type AdditionalInfo_Factor3S struct {
	Factor3S *Factor3SAdditionalInfo `protobuf:"bytes,1,opt,name=factor3s,proto3,oneof"`
}

type AdditionalInfo_FileTransfer

type AdditionalInfo_FileTransfer struct {
	FileTransfer *FileTransferAdditionalInfo `protobuf:"bytes,3,opt,name=file_transfer,json=fileTransfer,proto3,oneof"`
}

type AdditionalInfo_Pir

type AdditionalInfo_Pir struct {
	Pir *PIRAdditionalInfo `protobuf:"bytes,2,opt,name=pir,proto3,oneof"`
}

type Factor3SAdditionalInfo

type Factor3SAdditionalInfo struct {
	RequestCount int32 `protobuf:"varint,1,opt,name=request_count,json=requestCount,proto3" json:"request_count,omitempty"`
	UsageCount   int32 `protobuf:"varint,2,opt,name=usage_count,json=usageCount,proto3" json:"usage_count,omitempty"`
	// contains filtered or unexported fields
}

func (*Factor3SAdditionalInfo) Descriptor deprecated

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

Deprecated: Use Factor3SAdditionalInfo.ProtoReflect.Descriptor instead.

func (*Factor3SAdditionalInfo) GetRequestCount

func (x *Factor3SAdditionalInfo) GetRequestCount() int32

func (*Factor3SAdditionalInfo) GetUsageCount

func (x *Factor3SAdditionalInfo) GetUsageCount() int32

func (*Factor3SAdditionalInfo) ProtoMessage

func (*Factor3SAdditionalInfo) ProtoMessage()

func (*Factor3SAdditionalInfo) ProtoReflect

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

func (*Factor3SAdditionalInfo) Reset

func (x *Factor3SAdditionalInfo) Reset()

func (*Factor3SAdditionalInfo) String

func (x *Factor3SAdditionalInfo) String() string

type FileTransferAdditionalInfo

type FileTransferAdditionalInfo struct {
	FileSize  int64 `protobuf:"varint,1,opt,name=file_size,json=fileSize,proto3" json:"file_size,omitempty"`
	FileLines int64 `protobuf:"varint,2,opt,name=file_lines,json=fileLines,proto3" json:"file_lines,omitempty"`
	// contains filtered or unexported fields
}

func (*FileTransferAdditionalInfo) Descriptor deprecated

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

Deprecated: Use FileTransferAdditionalInfo.ProtoReflect.Descriptor instead.

func (*FileTransferAdditionalInfo) GetFileLines

func (x *FileTransferAdditionalInfo) GetFileLines() int64

func (*FileTransferAdditionalInfo) GetFileSize

func (x *FileTransferAdditionalInfo) GetFileSize() int64

func (*FileTransferAdditionalInfo) ProtoMessage

func (*FileTransferAdditionalInfo) ProtoMessage()

func (*FileTransferAdditionalInfo) ProtoReflect

func (*FileTransferAdditionalInfo) Reset

func (x *FileTransferAdditionalInfo) Reset()

func (*FileTransferAdditionalInfo) String

func (x *FileTransferAdditionalInfo) String() string

type ListAPIUsagesRequest

type ListAPIUsagesRequest struct {
	Paginator      *paginator.Paginator `protobuf:"bytes,1,opt,name=paginator,proto3" json:"paginator,omitempty"`
	Type           APIUsage_Type        `protobuf:"varint,2,opt,name=type,proto3,enum=sudo.protobuf.api_usage.APIUsage_Type" json:"type,omitempty"`
	Status         APIUsage_Status      `protobuf:"varint,3,opt,name=status,proto3,enum=sudo.protobuf.api_usage.APIUsage_Status" json:"status,omitempty"`
	CreateTimeFrom int64                `protobuf:"varint,4,opt,name=create_time_from,json=createTimeFrom,proto3" json:"create_time_from,omitempty"`
	CreateTimeTo   int64                `protobuf:"varint,5,opt,name=create_time_to,json=createTimeTo,proto3" json:"create_time_to,omitempty"`
	PartyId        string               `protobuf:"bytes,6,opt,name=party_id,json=partyId,proto3" json:"party_id,omitempty"`
	Caller         string               `protobuf:"bytes,7,opt,name=caller,proto3" json:"caller,omitempty"`
	ApiId          string               `protobuf:"bytes,8,opt,name=api_id,json=apiId,proto3" json:"api_id,omitempty"`
	IsClient       bool                 `protobuf:"varint,9,opt,name=is_client,json=isClient,proto3" json:"is_client,omitempty"`
	// contains filtered or unexported fields
}

func (*ListAPIUsagesRequest) Descriptor deprecated

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

Deprecated: Use ListAPIUsagesRequest.ProtoReflect.Descriptor instead.

func (*ListAPIUsagesRequest) GetApiId

func (x *ListAPIUsagesRequest) GetApiId() string

func (*ListAPIUsagesRequest) GetCaller

func (x *ListAPIUsagesRequest) GetCaller() string

func (*ListAPIUsagesRequest) GetCreateTimeFrom

func (x *ListAPIUsagesRequest) GetCreateTimeFrom() int64

func (*ListAPIUsagesRequest) GetCreateTimeTo

func (x *ListAPIUsagesRequest) GetCreateTimeTo() int64

func (*ListAPIUsagesRequest) GetIsClient

func (x *ListAPIUsagesRequest) GetIsClient() bool

func (*ListAPIUsagesRequest) GetPaginator

func (x *ListAPIUsagesRequest) GetPaginator() *paginator.Paginator

func (*ListAPIUsagesRequest) GetPartyId

func (x *ListAPIUsagesRequest) GetPartyId() string

func (*ListAPIUsagesRequest) GetStatus

func (x *ListAPIUsagesRequest) GetStatus() APIUsage_Status

func (*ListAPIUsagesRequest) GetType

func (x *ListAPIUsagesRequest) GetType() APIUsage_Type

func (*ListAPIUsagesRequest) ProtoMessage

func (*ListAPIUsagesRequest) ProtoMessage()

func (*ListAPIUsagesRequest) ProtoReflect

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

func (*ListAPIUsagesRequest) Reset

func (x *ListAPIUsagesRequest) Reset()

func (*ListAPIUsagesRequest) String

func (x *ListAPIUsagesRequest) String() string

type ListAPIUsagesResponse

type ListAPIUsagesResponse struct {
	Data  []*APIUsage `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"`
	Total int64       `protobuf:"varint,2,opt,name=total,proto3" json:"total,omitempty"`
	// contains filtered or unexported fields
}

func (*ListAPIUsagesResponse) Descriptor deprecated

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

Deprecated: Use ListAPIUsagesResponse.ProtoReflect.Descriptor instead.

func (*ListAPIUsagesResponse) GetData

func (x *ListAPIUsagesResponse) GetData() []*APIUsage

func (*ListAPIUsagesResponse) GetTotal

func (x *ListAPIUsagesResponse) GetTotal() int64

func (*ListAPIUsagesResponse) ProtoMessage

func (*ListAPIUsagesResponse) ProtoMessage()

func (*ListAPIUsagesResponse) ProtoReflect

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

func (*ListAPIUsagesResponse) Reset

func (x *ListAPIUsagesResponse) Reset()

func (*ListAPIUsagesResponse) String

func (x *ListAPIUsagesResponse) String() string

type PIRAdditionalInfo

type PIRAdditionalInfo struct {
	RequestCount int32 `protobuf:"varint,1,opt,name=request_count,json=requestCount,proto3" json:"request_count,omitempty"`
	UsageCount   int32 `protobuf:"varint,2,opt,name=usage_count,json=usageCount,proto3" json:"usage_count,omitempty"`
	// contains filtered or unexported fields
}

func (*PIRAdditionalInfo) Descriptor deprecated

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

Deprecated: Use PIRAdditionalInfo.ProtoReflect.Descriptor instead.

func (*PIRAdditionalInfo) GetRequestCount

func (x *PIRAdditionalInfo) GetRequestCount() int32

func (*PIRAdditionalInfo) GetUsageCount

func (x *PIRAdditionalInfo) GetUsageCount() int32

func (*PIRAdditionalInfo) ProtoMessage

func (*PIRAdditionalInfo) ProtoMessage()

func (*PIRAdditionalInfo) ProtoReflect

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

func (*PIRAdditionalInfo) Reset

func (x *PIRAdditionalInfo) Reset()

func (*PIRAdditionalInfo) String

func (x *PIRAdditionalInfo) String() string

type UpsertAPIUsageReceiverRequest

type UpsertAPIUsageReceiverRequest struct {
	Url      string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
	Token    string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"`
	Disabled bool   `protobuf:"varint,3,opt,name=disabled,proto3" json:"disabled,omitempty"`
	// contains filtered or unexported fields
}

func (*UpsertAPIUsageReceiverRequest) Descriptor deprecated

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

Deprecated: Use UpsertAPIUsageReceiverRequest.ProtoReflect.Descriptor instead.

func (*UpsertAPIUsageReceiverRequest) GetDisabled

func (x *UpsertAPIUsageReceiverRequest) GetDisabled() bool

func (*UpsertAPIUsageReceiverRequest) GetToken

func (x *UpsertAPIUsageReceiverRequest) GetToken() string

func (*UpsertAPIUsageReceiverRequest) GetUrl

func (*UpsertAPIUsageReceiverRequest) ProtoMessage

func (*UpsertAPIUsageReceiverRequest) ProtoMessage()

func (*UpsertAPIUsageReceiverRequest) ProtoReflect

func (*UpsertAPIUsageReceiverRequest) Reset

func (x *UpsertAPIUsageReceiverRequest) Reset()

func (*UpsertAPIUsageReceiverRequest) String

type UpsertAPIUsageReceiverResponse

type UpsertAPIUsageReceiverResponse struct {
	Status UpsertAPIUsageReceiverResponse_Status `` /* 133-byte string literal not displayed */
	// 异常时返回原因
	Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`
	// contains filtered or unexported fields
}

func (*UpsertAPIUsageReceiverResponse) Descriptor deprecated

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

Deprecated: Use UpsertAPIUsageReceiverResponse.ProtoReflect.Descriptor instead.

func (*UpsertAPIUsageReceiverResponse) GetMsg

func (*UpsertAPIUsageReceiverResponse) GetStatus

func (*UpsertAPIUsageReceiverResponse) ProtoMessage

func (*UpsertAPIUsageReceiverResponse) ProtoMessage()

func (*UpsertAPIUsageReceiverResponse) ProtoReflect

func (*UpsertAPIUsageReceiverResponse) Reset

func (x *UpsertAPIUsageReceiverResponse) Reset()

func (*UpsertAPIUsageReceiverResponse) String

type UpsertAPIUsageReceiverResponse_Status

type UpsertAPIUsageReceiverResponse_Status int32
const (
	UpsertAPIUsageReceiverResponse_UNKNOWN_STATUS UpsertAPIUsageReceiverResponse_Status = 0
	UpsertAPIUsageReceiverResponse_SUCCESS        UpsertAPIUsageReceiverResponse_Status = 1
	UpsertAPIUsageReceiverResponse_FAILED         UpsertAPIUsageReceiverResponse_Status = 2
)

func (UpsertAPIUsageReceiverResponse_Status) Descriptor

func (UpsertAPIUsageReceiverResponse_Status) Enum

func (UpsertAPIUsageReceiverResponse_Status) EnumDescriptor deprecated

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

Deprecated: Use UpsertAPIUsageReceiverResponse_Status.Descriptor instead.

func (UpsertAPIUsageReceiverResponse_Status) Number

func (UpsertAPIUsageReceiverResponse_Status) String

func (UpsertAPIUsageReceiverResponse_Status) Type

Jump to

Keyboard shortcuts

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