key

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2023 License: MIT Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

type Provider string
const (
	OpenAiProvider Provider = "openai"
)

type RequestKey

type RequestKey struct {
	Name                   string   `json:"name"`
	CreatedAt              int64    `json:"createdAt"`
	UpdatedAt              int64    `json:"updatedAt"`
	Tags                   []string `json:"tags"`
	KeyId                  string   `json:"keyId"`
	Key                    string   `json:"key"`
	CostLimitInUsd         float64  `json:"costLimitInUsd"`
	CostLimitInUsdOverTime float64  `json:"costLimitInUsdOverTime"`
	CostLimitInUsdUnit     TimeUnit `json:"costLimitInUsdUnit"`
	RateLimitOverTime      int      `json:"rateLimitOverTime"`
	RateLimitUnit          TimeUnit `json:"rateLimitUnit"`
	Ttl                    string   `json:"ttl"`
}

func (*RequestKey) Validate

func (rk *RequestKey) Validate() error

type ResponseKey

type ResponseKey struct {
	Name                   string   `json:"name"`
	CreatedAt              int64    `json:"createdAt"`
	UpdatedAt              int64    `json:"updatedAt"`
	Tags                   []string `json:"tags"`
	KeyId                  string   `json:"keyId"`
	Revoked                bool     `json:"revoked"`
	Key                    string   `json:"key"`
	RevokedReason          string   `json:"revokedReason"`
	CostLimitInUsd         float64  `json:"costLimitInUsd"`
	CostLimitInUsdOverTime float64  `json:"costLimitInUsdOverTime"`
	CostLimitInUsdUnit     TimeUnit `json:"costLimitInUsdUnit"`
	RateLimitOverTime      int      `json:"rateLimitOverTime"`
	RateLimitUnit          TimeUnit `json:"rateLimitUnit"`
	Ttl                    string   `json:"ttl"`
}

type TimeUnit

type TimeUnit string
const (
	HourTimeUnit   TimeUnit = "h"
	MinuteTimeUnit TimeUnit = "m"
	SecondTimeUnit TimeUnit = "s"
	DayTimeUnit    TimeUnit = "d"
)

type UpdateKey

type UpdateKey struct {
	Name                   string   `json:"name"`
	UpdatedAt              int64    `json:"updatedAt"`
	Tags                   []string `json:"tags"`
	Revoked                *bool    `json:"revoked"`
	RevokedReason          string   `json:"revokedReason"`
	CostLimitInUsd         float64  `json:"costLimitInUsd"`
	CostLimitInUsdOverTime float64  `json:"costLimitInUsdOverTime"`
	CostLimitInUsdUnit     TimeUnit `json:"costLimitInUsdUnit"`
	RateLimitOverTime      int      `json:"rateLimitOverTime"`
	RateLimitUnit          TimeUnit `json:"rateLimitUnit"`
	Ttl                    string   `json:"ttl"`
}

func (*UpdateKey) Validate

func (uk *UpdateKey) Validate() error

Jump to

Keyboard shortcuts

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