ai_key_dto

package
v1.4.1-beta Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Create

type Create struct {
	Id         string `json:"id"`
	Name       string `json:"name"`
	Config     string `json:"config"`
	ExpireTime int    `json:"expire_time"`
}

type Edit

type Edit struct {
	Name       *string `json:"name"`
	Config     *string `json:"config"`
	ExpireTime *int    `json:"expire_time"`
}

type Item

type Item struct {
	Id         string         `json:"id"`
	Name       string         `json:"name"`
	Status     KeyStatus      `json:"status"`
	UseToken   int            `json:"use_token"`
	UpdateTime auto.TimeLabel `json:"update_time"`
	ExpireTime int            `json:"expire_time"`
	Priority   int            `json:"priority"`
	CanDelete  bool           `json:"can_delete"`
}

type Key

type Key struct {
	Id         string `json:"id"`
	Name       string `json:"name"`
	Config     string `json:"config"`
	ExpireTime int    `json:"expire_time"`
}

type KeyStatus

type KeyStatus string
var (
	KeyNormal  KeyStatus = "normal"
	KeyExceed  KeyStatus = "exceeded"
	KeyExpired KeyStatus = "expired"
	KeyDisable KeyStatus = "disabled"
	KeyError   KeyStatus = "error"
)

func ToKeyStatus

func ToKeyStatus(status int) KeyStatus

func (KeyStatus) Int

func (s KeyStatus) Int() int

func (KeyStatus) String

func (s KeyStatus) String() string

type Sort

type Sort struct {
	Origin string `json:"origin"`
	Target string `json:"target"`
	Sort   string `json:"sort"`
}

Jump to

Keyboard shortcuts

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