ai_balance

package
v1.9.3-beta Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Balance

type Balance struct {
	Id           string
	Priority     int
	Provider     string
	ProviderName string
	Model        string
	ModelName    string
	Type         int
	State        int
	Creator      string
	Updater      string
	CreateAt     time.Time
	UpdateAt     time.Time
}

func FromEntity

func FromEntity(e *ai.Balance) *Balance

type Create

type Create struct {
	Id           string
	Priority     int
	Provider     string
	ProviderName string
	Model        string
	ModelName    string
	Type         int
}

type Edit

type Edit struct {
	Priority *int
	State    *int
}

type IBalanceService

type IBalanceService interface {
	universally.IServiceGet[Balance]
	universally.IServiceCreate[Create]
	universally.IServiceEdit[Edit]
	universally.IServiceDelete
	MaxPriority(ctx context.Context) (int, error)
	SortBefore(ctx context.Context, originID string, targetID string) ([]*Balance, error)
	SortAfter(ctx context.Context, originID string, targetID string) ([]*Balance, error)
	Exist(ctx context.Context, provider string, model string) (bool, error)
}

Jump to

Keyboard shortcuts

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