charge

package
v0.0.0-...-4bea83a Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MethodType_name = map[int32]string{
		0: "GET",
		1: "POST",
		2: "PUT",
	}
	MethodType_value = map[string]int32{
		"GET":  0,
		"POST": 1,
		"PUT":  2,
	}
)

Enum value maps for MethodType.

View Source
var (
	PassWayType_name = map[int32]string{
		0: "QUERY",
		1: "PATH",
		2: "BODY",
		3: "MULTIPART",
	}
	PassWayType_value = map[string]int32{
		"QUERY":     0,
		"PATH":      1,
		"BODY":      2,
		"MULTIPART": 3,
	}
)

Enum value maps for PassWayType.

View Source
var (
	InterfaceStatus_name = map[int32]string{
		0: "ABLE",
		1: "UNABLE",
		2: "DELETE",
	}
	InterfaceStatus_value = map[string]int32{
		"ABLE":   0,
		"UNABLE": 1,
		"DELETE": 2,
	}
)

Enum value maps for InterfaceStatus.

View Source
var (
	ChargeType_name = map[int32]string{
		0: "TIMES",
		1: "TOKENS",
	}
	ChargeType_value = map[string]int32{
		"TIMES":  0,
		"TOKENS": 1,
	}
)

Enum value maps for ChargeType.

View Source
var (
	LogStatus_name = map[int32]string{
		0: "SUCCESS",
		1: "UNKNOWN_FAIL",
		2: "NETWORK_FAIL",
		3: "INVALID_PARAMS",
		4: "PERMISSION_DENIED",
	}
	LogStatus_value = map[string]int32{
		"SUCCESS":           0,
		"UNKNOWN_FAIL":      1,
		"NETWORK_FAIL":      2,
		"INVALID_PARAMS":    3,
		"PERMISSION_DENIED": 4,
	}
)

Enum value maps for LogStatus.

View Source
var File_openapi_charge_common_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Account

type Account struct {
	Id         string `protobuf:"bytes,1,opt,name=id,proto3" form:"id" json:"id" query:"id"`
	TxId       string `protobuf:"bytes,2,opt,name=txId,proto3" form:"txId" json:"txId" query:"txId"`
	Increment  int64  `protobuf:"varint,3,opt,name=increment,proto3" form:"increment" json:"increment" query:"increment"`
	MarginId   string `protobuf:"bytes,4,opt,name=marginId,proto3" form:"marginId" json:"marginId" query:"marginId"`
	CreateTime int64  `protobuf:"varint,5,opt,name=createTime,proto3" form:"createTime" json:"createTime" query:"createTime"`
	// contains filtered or unexported fields
}

func (*Account) Descriptor deprecated

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

Deprecated: Use Account.ProtoReflect.Descriptor instead.

func (*Account) GetCreateTime

func (x *Account) GetCreateTime() int64

func (*Account) GetId

func (x *Account) GetId() string

func (*Account) GetIncrement

func (x *Account) GetIncrement() int64

func (*Account) GetMarginId

func (x *Account) GetMarginId() string

func (*Account) GetTxId

func (x *Account) GetTxId() string

func (*Account) ProtoMessage

func (*Account) ProtoMessage()

func (*Account) ProtoReflect

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

func (*Account) Reset

func (x *Account) Reset()

func (*Account) String

func (x *Account) String() string

type BaseInterface

type BaseInterface struct {
	Id         string          `protobuf:"bytes,1,opt,name=id,proto3" form:"id" json:"id" query:"id"`
	Name       string          `protobuf:"bytes,2,opt,name=name,proto3" form:"name" json:"name" query:"name"`                                              // 接口名
	Host       string          `protobuf:"bytes,3,opt,name=host,proto3" form:"host" json:"host" query:"host"`                                              // 域名
	Path       string          `protobuf:"bytes,4,opt,name=path,proto3" form:"path" json:"path" query:"path"`                                              // 调用路径
	Method     MethodType      `protobuf:"varint,5,opt,name=method,proto3,enum=openapi.charge.MethodType" form:"method" json:"method" query:"method"`      // 调用方式
	PassWay    PassWayType     `protobuf:"varint,6,opt,name=passWay,proto3,enum=openapi.charge.PassWayType" form:"passWay" json:"passWay" query:"passWay"` // 传值方式
	Params     []*Parameter    `protobuf:"bytes,7,rep,name=params,proto3" form:"params" json:"params" query:"params"`                                      // 参数列表
	Content    string          `protobuf:"bytes,8,opt,name=content,proto3" form:"content" json:"content" query:"content"`
	Status     InterfaceStatus `protobuf:"varint,9,opt,name=status,proto3,enum=openapi.charge.InterfaceStatus" form:"status" json:"status" query:"status"` // 接口状态
	CreateTime int64           `protobuf:"varint,10,opt,name=createTime,proto3" form:"createTime" json:"createTime" query:"createTime"`
	UpdateTime int64           `protobuf:"varint,11,opt,name=updateTime,proto3" form:"updateTime" json:"updateTime" query:"updateTime"`
	// contains filtered or unexported fields
}

func (*BaseInterface) Descriptor deprecated

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

Deprecated: Use BaseInterface.ProtoReflect.Descriptor instead.

func (*BaseInterface) GetContent

func (x *BaseInterface) GetContent() string

func (*BaseInterface) GetCreateTime

func (x *BaseInterface) GetCreateTime() int64

func (*BaseInterface) GetHost

func (x *BaseInterface) GetHost() string

func (*BaseInterface) GetId

func (x *BaseInterface) GetId() string

func (*BaseInterface) GetMethod

func (x *BaseInterface) GetMethod() MethodType

func (*BaseInterface) GetName

func (x *BaseInterface) GetName() string

func (*BaseInterface) GetParams

func (x *BaseInterface) GetParams() []*Parameter

func (*BaseInterface) GetPassWay

func (x *BaseInterface) GetPassWay() PassWayType

func (*BaseInterface) GetPath

func (x *BaseInterface) GetPath() string

func (*BaseInterface) GetStatus

func (x *BaseInterface) GetStatus() InterfaceStatus

func (*BaseInterface) GetUpdateTime

func (x *BaseInterface) GetUpdateTime() int64

func (*BaseInterface) ProtoMessage

func (*BaseInterface) ProtoMessage()

func (*BaseInterface) ProtoReflect

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

func (*BaseInterface) Reset

func (x *BaseInterface) Reset()

func (*BaseInterface) String

func (x *BaseInterface) String() string

type ChargeType

type ChargeType int32
const (
	ChargeType_TIMES  ChargeType = 0 // 按次计费
	ChargeType_TOKENS ChargeType = 1 // 按量计费
)

func (ChargeType) Descriptor

func (ChargeType) Descriptor() protoreflect.EnumDescriptor

func (ChargeType) Enum

func (x ChargeType) Enum() *ChargeType

func (ChargeType) EnumDescriptor deprecated

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

Deprecated: Use ChargeType.Descriptor instead.

func (ChargeType) Number

func (x ChargeType) Number() protoreflect.EnumNumber

func (ChargeType) String

func (x ChargeType) String() string

func (ChargeType) Type

type Discount

type Discount struct {
	Num  int64 `protobuf:"varint,1,opt,name=num,proto3" form:"num" json:"num" query:"num"`
	Rate int64 `protobuf:"varint,2,opt,name=rate,proto3" form:"rate" json:"rate" query:"rate"`
	Low  int64 `protobuf:"varint,3,opt,name=low,proto3" form:"low" json:"low" query:"low"`
	// contains filtered or unexported fields
}

func (*Discount) Descriptor deprecated

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

Deprecated: Use Discount.ProtoReflect.Descriptor instead.

func (*Discount) GetLow

func (x *Discount) GetLow() int64

func (*Discount) GetNum

func (x *Discount) GetNum() int64

func (*Discount) GetRate

func (x *Discount) GetRate() int64

func (*Discount) ProtoMessage

func (*Discount) ProtoMessage()

func (*Discount) ProtoReflect

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

func (*Discount) Reset

func (x *Discount) Reset()

func (*Discount) String

func (x *Discount) String() string

type FullInterface

type FullInterface struct {
	Id              string     `protobuf:"bytes,1,opt,name=id,proto3" form:"id" json:"id" query:"id"`
	BaseInterfaceId string     `protobuf:"bytes,2,opt,name=baseInterfaceId,proto3" form:"baseInterfaceId" json:"baseInterfaceId" query:"baseInterfaceId"` // 基础接口id
	UserId          string     `protobuf:"bytes,3,opt,name=userId,proto3" form:"userId" json:"userId" query:"userId"`                                     // 面向用户id
	ChargeType      ChargeType ``                                                                                                                         // 收费模式
	/* 132-byte string literal not displayed */
	Price      int64           `protobuf:"varint,5,opt,name=price,proto3" form:"price" json:"price" query:"price"`                                         // 接口单价
	Status     InterfaceStatus `protobuf:"varint,7,opt,name=status,proto3,enum=openapi.charge.InterfaceStatus" form:"status" json:"status" query:"status"` // 接口状态
	CreateTime int64           `protobuf:"varint,8,opt,name=createTime,proto3" form:"createTime" json:"createTime" query:"createTime"`                     // 创建时间
	UpdateTime int64           `protobuf:"varint,9,opt,name=updateTime,proto3" form:"updateTime" json:"updateTime" query:"updateTime"`                     // 更新时间
	// contains filtered or unexported fields
}

func (*FullInterface) Descriptor deprecated

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

Deprecated: Use FullInterface.ProtoReflect.Descriptor instead.

func (*FullInterface) GetBaseInterfaceId

func (x *FullInterface) GetBaseInterfaceId() string

func (*FullInterface) GetChargeType

func (x *FullInterface) GetChargeType() ChargeType

func (*FullInterface) GetCreateTime

func (x *FullInterface) GetCreateTime() int64

func (*FullInterface) GetId

func (x *FullInterface) GetId() string

func (*FullInterface) GetPrice

func (x *FullInterface) GetPrice() int64

func (*FullInterface) GetStatus

func (x *FullInterface) GetStatus() InterfaceStatus

func (*FullInterface) GetUpdateTime

func (x *FullInterface) GetUpdateTime() int64

func (*FullInterface) GetUserId

func (x *FullInterface) GetUserId() string

func (*FullInterface) ProtoMessage

func (*FullInterface) ProtoMessage()

func (*FullInterface) ProtoReflect

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

func (*FullInterface) Reset

func (x *FullInterface) Reset()

func (*FullInterface) String

func (x *FullInterface) String() string

type Gradient

type Gradient struct {
	Id              string          `protobuf:"bytes,1,opt,name=id,proto3" form:"id" json:"id" query:"id"`
	BaseInterfaceId string          `protobuf:"bytes,2,opt,name=baseInterfaceId,proto3" form:"baseInterfaceId" json:"baseInterfaceId" query:"baseInterfaceId"`
	Discounts       []*Discount     `protobuf:"bytes,3,rep,name=discounts,proto3" form:"discounts" json:"discounts" query:"discounts"`
	Status          InterfaceStatus `protobuf:"varint,4,opt,name=status,proto3,enum=openapi.charge.InterfaceStatus" form:"status" json:"status" query:"status"`
	CreateTime      int64           `protobuf:"varint,5,opt,name=createTime,proto3" form:"createTime" json:"createTime" query:"createTime"`
	UpdateTime      int64           `protobuf:"varint,6,opt,name=updateTime,proto3" form:"updateTime" json:"updateTime" query:"updateTime"`
	// contains filtered or unexported fields
}

func (*Gradient) Descriptor deprecated

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

Deprecated: Use Gradient.ProtoReflect.Descriptor instead.

func (*Gradient) GetBaseInterfaceId

func (x *Gradient) GetBaseInterfaceId() string

func (*Gradient) GetCreateTime

func (x *Gradient) GetCreateTime() int64

func (*Gradient) GetDiscounts

func (x *Gradient) GetDiscounts() []*Discount

func (*Gradient) GetId

func (x *Gradient) GetId() string

func (*Gradient) GetStatus

func (x *Gradient) GetStatus() InterfaceStatus

func (*Gradient) GetUpdateTime

func (x *Gradient) GetUpdateTime() int64

func (*Gradient) ProtoMessage

func (*Gradient) ProtoMessage()

func (*Gradient) ProtoReflect

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

func (*Gradient) Reset

func (x *Gradient) Reset()

func (*Gradient) String

func (x *Gradient) String() string

type InterfaceStatus

type InterfaceStatus int32
const (
	InterfaceStatus_ABLE   InterfaceStatus = 0
	InterfaceStatus_UNABLE InterfaceStatus = 1
	InterfaceStatus_DELETE InterfaceStatus = 2
)

func (InterfaceStatus) Descriptor

func (InterfaceStatus) Enum

func (x InterfaceStatus) Enum() *InterfaceStatus

func (InterfaceStatus) EnumDescriptor deprecated

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

Deprecated: Use InterfaceStatus.Descriptor instead.

func (InterfaceStatus) Number

func (InterfaceStatus) String

func (x InterfaceStatus) String() string

func (InterfaceStatus) Type

type Log

type Log struct {
	Id              string    `protobuf:"bytes,1,opt,name=id,proto3" form:"id" json:"id" query:"id"`                                                     // 记录id
	FullInterfaceId string    `protobuf:"bytes,2,opt,name=fullInterfaceId,proto3" form:"fullInterfaceId" json:"fullInterfaceId" query:"fullInterfaceId"` // 被调用的完整接口id
	UserId          string    `protobuf:"bytes,3,opt,name=userId,proto3" form:"userId" json:"userId" query:"userId"`                                     // 调用用户的id
	KeyId           string    `protobuf:"bytes,4,opt,name=keyId,proto3" form:"keyId" json:"keyId" query:"keyId"`                                         // 调用key的id
	Status          LogStatus `protobuf:"varint,5,opt,name=status,proto3,enum=openapi.charge.LogStatus" form:"status" json:"status" query:"status"`      // 调用的状态
	Info            string    `protobuf:"bytes,6,opt,name=info,proto3" form:"info" json:"info" query:"info"`                                             // 调用相关信息
	Count           int64     `protobuf:"varint,7,opt,name=count,proto3" form:"count" json:"count" query:"count"`                                        // 数量(按次则是次数1,按token则是token数)
	Value           int64     `protobuf:"varint,8,opt,name=value,proto3" form:"value" json:"value" query:"value"`                                        // 调用扣费
	Timestamp       int64     `protobuf:"varint,9,opt,name=timestamp,proto3" form:"timestamp" json:"timestamp" query:"timestamp"`                        // 调用时间
	CreateTime      int64     `protobuf:"varint,10,opt,name=createTime,proto3" form:"createTime" json:"createTime" query:"createTime"`                   // 创建时间
	// contains filtered or unexported fields
}

func (*Log) Descriptor deprecated

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

Deprecated: Use Log.ProtoReflect.Descriptor instead.

func (*Log) GetCount

func (x *Log) GetCount() int64

func (*Log) GetCreateTime

func (x *Log) GetCreateTime() int64

func (*Log) GetFullInterfaceId

func (x *Log) GetFullInterfaceId() string

func (*Log) GetId

func (x *Log) GetId() string

func (*Log) GetInfo

func (x *Log) GetInfo() string

func (*Log) GetKeyId

func (x *Log) GetKeyId() string

func (*Log) GetStatus

func (x *Log) GetStatus() LogStatus

func (*Log) GetTimestamp

func (x *Log) GetTimestamp() int64

func (*Log) GetUserId

func (x *Log) GetUserId() string

func (*Log) GetValue

func (x *Log) GetValue() int64

func (*Log) ProtoMessage

func (*Log) ProtoMessage()

func (*Log) ProtoReflect

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

func (*Log) Reset

func (x *Log) Reset()

func (*Log) String

func (x *Log) String() string

type LogStatus

type LogStatus int32
const (
	LogStatus_SUCCESS           LogStatus = 0 // 成功
	LogStatus_UNKNOWN_FAIL      LogStatus = 1 // 未知错误
	LogStatus_NETWORK_FAIL      LogStatus = 2 // 网络错误
	LogStatus_INVALID_PARAMS    LogStatus = 3 // 参数错误
	LogStatus_PERMISSION_DENIED LogStatus = 4 // 没有对应权限
)

func (LogStatus) Descriptor

func (LogStatus) Descriptor() protoreflect.EnumDescriptor

func (LogStatus) Enum

func (x LogStatus) Enum() *LogStatus

func (LogStatus) EnumDescriptor deprecated

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

Deprecated: Use LogStatus.Descriptor instead.

func (LogStatus) Number

func (x LogStatus) Number() protoreflect.EnumNumber

func (LogStatus) String

func (x LogStatus) String() string

func (LogStatus) Type

type Margin

type Margin struct {
	Id              string `protobuf:"bytes,1,opt,name=id,proto3" form:"id" json:"id" query:"id"`
	UserId          string `protobuf:"bytes,2,opt,name=userId,proto3" form:"userId" json:"userId" query:"userId"`
	FullInterfaceId string `protobuf:"bytes,3,opt,name=fullInterfaceId,proto3" form:"fullInterfaceId" json:"fullInterfaceId" query:"fullInterfaceId"`
	Margin          int64  `protobuf:"varint,4,opt,name=margin,proto3" form:"margin" json:"margin" query:"margin"`
	CreateTime      int64  `protobuf:"varint,5,opt,name=createTime,proto3" form:"createTime" json:"createTime" query:"createTime"`
	UpdateTime      int64  `protobuf:"varint,6,opt,name=updateTime,proto3" form:"updateTime" json:"updateTime" query:"updateTime"`
	// contains filtered or unexported fields
}

func (*Margin) Descriptor deprecated

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

Deprecated: Use Margin.ProtoReflect.Descriptor instead.

func (*Margin) GetCreateTime

func (x *Margin) GetCreateTime() int64

func (*Margin) GetFullInterfaceId

func (x *Margin) GetFullInterfaceId() string

func (*Margin) GetId

func (x *Margin) GetId() string

func (*Margin) GetMargin

func (x *Margin) GetMargin() int64

func (*Margin) GetUpdateTime

func (x *Margin) GetUpdateTime() int64

func (*Margin) GetUserId

func (x *Margin) GetUserId() string

func (*Margin) ProtoMessage

func (*Margin) ProtoMessage()

func (*Margin) ProtoReflect

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

func (*Margin) Reset

func (x *Margin) Reset()

func (*Margin) String

func (x *Margin) String() string

type MethodType

type MethodType int32
const (
	MethodType_GET  MethodType = 0
	MethodType_POST MethodType = 1
	MethodType_PUT  MethodType = 2
)

func (MethodType) Descriptor

func (MethodType) Descriptor() protoreflect.EnumDescriptor

func (MethodType) Enum

func (x MethodType) Enum() *MethodType

func (MethodType) EnumDescriptor deprecated

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

Deprecated: Use MethodType.Descriptor instead.

func (MethodType) Number

func (x MethodType) Number() protoreflect.EnumNumber

func (MethodType) String

func (x MethodType) String() string

func (MethodType) Type

type Parameter

type Parameter struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" form:"name" json:"name" query:"name"`
	Type string `protobuf:"bytes,2,opt,name=type,proto3" form:"type" json:"type" query:"type"`
	// contains filtered or unexported fields
}

func (*Parameter) Descriptor deprecated

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

Deprecated: Use Parameter.ProtoReflect.Descriptor instead.

func (*Parameter) GetName

func (x *Parameter) GetName() string

func (*Parameter) GetType

func (x *Parameter) GetType() string

func (*Parameter) ProtoMessage

func (*Parameter) ProtoMessage()

func (*Parameter) ProtoReflect

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

func (*Parameter) Reset

func (x *Parameter) Reset()

func (*Parameter) String

func (x *Parameter) String() string

type PassWayType

type PassWayType int32
const (
	PassWayType_QUERY     PassWayType = 0 // Query Param
	PassWayType_PATH      PassWayType = 1 // Path Param
	PassWayType_BODY      PassWayType = 2 // Request Body(json)
	PassWayType_MULTIPART PassWayType = 3 // Multipart/form-data
)

func (PassWayType) Descriptor

func (PassWayType) Enum

func (x PassWayType) Enum() *PassWayType

func (PassWayType) EnumDescriptor deprecated

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

Deprecated: Use PassWayType.Descriptor instead.

func (PassWayType) Number

func (x PassWayType) Number() protoreflect.EnumNumber

func (PassWayType) String

func (x PassWayType) String() string

func (PassWayType) Type

Jump to

Keyboard shortcuts

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