ai_usage

package
v1.0.43 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AiUsageSliceToJSON

func AiUsageSliceToJSON(e []AiUsage) json.RawMessage

func AiUsageToJSON

func AiUsageToJSON(e AiUsage) json.RawMessage

func ContextSliceToJSON

func ContextSliceToJSON(in []Context) json.RawMessage

func ProviderSliceToJSON

func ProviderSliceToJSON(in []Provider) json.RawMessage

func StatusSliceToJSON

func StatusSliceToJSON(in []Status) json.RawMessage

Types

type AiUsage

type AiUsage struct {
	UUID               uuid.UUID `json:"uuid"`
	UserUUID           uuid.UUID `json:"user_uuid"`
	ProjectUUID        uuid.UUID `json:"project_uuid"`
	ProjectVersionUUID uuid.UUID `json:"project_version_uuid"`
	UserPrompt         string    `json:"user_prompt"`
	Step               string    `json:"step"`
	Context            Context   `json:"context"`
	Provider           Provider  `json:"provider"`
	InputTokens        int64     `json:"input_tokens"`
	OutputTokens       int64     `json:"output_tokens"`
	Status             Status    `json:"status"`
	CreatedAt          time.Time `json:"created_at"`
	UpdatedAt          time.Time `json:"updated_at"`
	CreatedByUUID      uuid.UUID `json:"created_by_uuid"`
	UpdatedByUUID      uuid.UUID `json:"updated_by_uuid"`
}

func AiUsageFromJSON

func AiUsageFromJSON(data json.RawMessage) AiUsage

func AiUsageSliceFromJSON

func AiUsageSliceFromJSON(data json.RawMessage) []AiUsage

func NewAiUsageSliceWithRandomValues

func NewAiUsageSliceWithRandomValues(n int) []AiUsage

func NewAiUsageWithRandomValues

func NewAiUsageWithRandomValues() AiUsage

func (AiUsage) ArrayFieldIdentifierToType

func (e AiUsage) ArrayFieldIdentifierToType() map[string]types.FieldType

func (AiUsage) DependantFieldIdentifierToTypeMap

func (e AiUsage) DependantFieldIdentifierToTypeMap() map[string]map[string]types.FieldType

func (AiUsage) EntityIdentifier

func (e AiUsage) EntityIdentifier() string

func (AiUsage) FieldIdentfierToTypeMap

func (e AiUsage) FieldIdentfierToTypeMap() map[string]types.FieldType

func (AiUsage) IsDependant

func (e AiUsage) IsDependant() bool

func (AiUsage) OrderedFieldIdentifiers

func (e AiUsage) OrderedFieldIdentifiers() []string

func (AiUsage) PrimaryKeyIdentifier

func (e AiUsage) PrimaryKeyIdentifier() string

func (AiUsage) PrimaryKeyValue

func (e AiUsage) PrimaryKeyValue() string

func (AiUsage) String

func (e AiUsage) String() string

func (AiUsage) ToJSON

func (e AiUsage) ToJSON() json.RawMessage

type Context

type Context int64
const (
	CONTEXT_INVALID Context = iota
	CONTEXT_EDITOR_ASSISTANT
	CONTEXT_DATA_MANAGER
	CONTEXT_EDITOR_LAYOUT
)

func ContextFromPointerString

func ContextFromPointerString(in *string) Context

func ContextFromString

func ContextFromString(in string) Context

func JSONToContextSlice

func JSONToContextSlice(in json.RawMessage) []Context

func (Context) String

func (e Context) String() string

func (Context) StringPtr

func (e Context) StringPtr() *string

func (Context) ToInt64

func (e Context) ToInt64() int64

type Provider

type Provider int64
const (
	PROVIDER_INVALID Provider = iota
	PROVIDER_CLAUDE
)

func JSONToProviderSlice

func JSONToProviderSlice(in json.RawMessage) []Provider

func ProviderFromPointerString

func ProviderFromPointerString(in *string) Provider

func ProviderFromString

func ProviderFromString(in string) Provider

func (Provider) String

func (e Provider) String() string

func (Provider) StringPtr

func (e Provider) StringPtr() *string

func (Provider) ToInt64

func (e Provider) ToInt64() int64

type Status

type Status int64
const (
	STATUS_INVALID Status = iota
	STATUS_ACTIVE
	STATUS_DISABLED
)

func JSONToStatusSlice

func JSONToStatusSlice(in json.RawMessage) []Status

func StatusFromPointerString

func StatusFromPointerString(in *string) Status

func StatusFromString

func StatusFromString(in string) Status

func (Status) String

func (e Status) String() string

func (Status) StringPtr

func (e Status) StringPtr() *string

func (Status) ToInt64

func (e Status) ToInt64() int64

Jump to

Keyboard shortcuts

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