key

package
v1.25.3 Latest Latest
Warning

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

Go to latest
Published: May 21, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const RevokedReasonExpired string = "expired"

Variables

This section is empty.

Functions

This section is empty.

Types

type GetKeysResponse added in v1.18.3

type GetKeysResponse struct {
	Keys  []*ResponseKey `json:"keys"`
	Count int            `json:"count"`
}

type KeyReporting added in v0.0.7

type KeyReporting struct {
	Id                 string `json:"id"`
	CostInMicroDollars int64  `json:"costInMicroDollars"`
}

type KeyRequest added in v1.18.0

type KeyRequest struct {
	KeyIds      []string `json:"keyIds"`
	Tags        []string `json:"tags"`
	Name        string   `json:"name"`
	Revoked     *bool    `json:"revoked"`
	Limit       int      `json:"limit"`
	Offset      int      `json:"offset"`
	Order       string   `json:"order"`
	ReturnCount bool     `json:"returnCount"`
}

type PathConfig added in v1.4.1

type PathConfig struct {
	Method string `json:"method"`
	Path   string `json:"path"`
}

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"`
	SettingId              string       `json:"settingId"`
	AllowedPaths           []PathConfig `json:"allowedPaths"`
	SettingIds             []string     `json:"settingIds"`
	ShouldLogRequest       bool         `json:"shouldLogRequest"`
	ShouldLogResponse      bool         `json:"shouldLogResponse"`
	RotationEnabled        bool         `json:"rotationEnabled"`
	PolicyId               string       `json:"policyId"`
	IsKeyNotHashed         bool         `json:"isKeyNotHashed"`
}

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"`
	SettingId              string       `json:"settingId"`
	AllowedPaths           []PathConfig `json:"allowedPaths"`
	SettingIds             []string     `json:"settingIds"`
	ShouldLogRequest       bool         `json:"shouldLogRequest"`
	ShouldLogResponse      bool         `json:"shouldLogResponse"`
	RotationEnabled        bool         `json:"rotationEnabled"`
	PolicyId               string       `json:"policyId"`
	IsKeyNotHashed         bool         `json:"isKeyNotHashed"`
}

func (*ResponseKey) GetSettingIds added in v1.7.0

func (rk *ResponseKey) GetSettingIds() []string

type TimeUnit

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

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"`
	Key                    string        `json:"key"`
	SettingId              string        `json:"settingId"`
	SettingIds             []string      `json:"settingIds"`
	CostLimitInUsd         *float64      `json:"costLimitInUsd"`
	CostLimitInUsdOverTime *float64      `json:"costLimitInUsdOverTime"`
	CostLimitInUsdUnit     *TimeUnit     `json:"costLimitInUsdUnit"`
	RateLimitOverTime      *int          `json:"rateLimitOverTime"`
	RateLimitUnit          *TimeUnit     `json:"rateLimitUnit"`
	AllowedPaths           *[]PathConfig `json:"allowedPaths,omitempty"`
	ShouldLogRequest       *bool         `json:"shouldLogRequest"`
	ShouldLogResponse      *bool         `json:"shouldLogResponse"`
	RotationEnabled        *bool         `json:"rotationEnabled"`
	PolicyId               *string       `json:"policyId"`
	IsKeyNotHashed         *bool         `json:"isKeyNotHashed"`
}

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