bucket

package
v0.0.0-...-286b722 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2025 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func NewLoaderContext

func NewLoaderContext(ctx context.Context, watcher *watcher.Watcher[*Bucket]) context.Context

func NewWatcher

func NewWatcher(ctx context.Context, mgr *watcher.Manager) *watcher.Watcher[*Bucket]
func Search(ctx context.Context, q string) ([]*search.Result, error)

Types

type Bucket

type Bucket struct {
	Name                     string              `json:"name"`
	CascadingDelete          bool                `json:"cascadingDelete"`
	PublicAccessPrevention   string              `json:"publicAccessPrevention"`
	UniformBucketLevelAccess bool                `json:"uniformBucketLevelAccess"`
	Status                   *BucketStatus       `json:"status"`
	Cors                     []*BucketCors       `json:"-"`
	TeamSlug                 slug.Slug           `json:"-"`
	EnvironmentName          string              `json:"-"`
	WorkloadReference        *workload.Reference `json:"-"`
	ProjectID                string              `json:"-"`
}

func Get

func Get(ctx context.Context, teamSlug slug.Slug, environment, name string) (*Bucket, error)

func GetByIdent

func GetByIdent(ctx context.Context, id ident.Ident) (*Bucket, error)

func ListAllForTeam

func ListAllForTeam(ctx context.Context, teamSlug slug.Slug) []*Bucket

func (*Bucket) DeepCopyObject

func (b *Bucket) DeepCopyObject() runtime.Object

func (*Bucket) GetLabels

func (b *Bucket) GetLabels() map[string]string

func (*Bucket) GetName

func (b *Bucket) GetName() string

func (*Bucket) GetNamespace

func (b *Bucket) GetNamespace() string

func (*Bucket) GetObjectKind

func (b *Bucket) GetObjectKind() schema.ObjectKind

func (Bucket) ID

func (b Bucket) ID() ident.Ident

func (Bucket) IsNode

func (Bucket) IsNode()

func (Bucket) IsPersistence

func (Bucket) IsPersistence()

func (Bucket) IsSearchNode

func (Bucket) IsSearchNode()

type BucketConnection

type BucketConnection = pagination.Connection[*Bucket]

func ListForTeam

func ListForTeam(ctx context.Context, teamSlug slug.Slug, page *pagination.Pagination, orderBy *BucketOrder) (*BucketConnection, error)

func ListForWorkload

func ListForWorkload(ctx context.Context, teamSlug slug.Slug, references []nais_io_v1.CloudStorageBucket, orderBy *BucketOrder) (*BucketConnection, error)

type BucketCors

type BucketCors struct {
	MaxAgeSeconds   *int64   `json:"maxAgeSeconds,omitempty"`
	Methods         []string `json:"methods"`
	Origins         []string `json:"origins"`
	ResponseHeaders []string `json:"responseHeaders"`
}

type BucketCorsConnection

type BucketCorsConnection = pagination.Connection[*BucketCors]

type BucketCorsEdge

type BucketCorsEdge = pagination.Edge[*BucketCors]

type BucketEdge

type BucketEdge = pagination.Edge[*Bucket]

type BucketError

type BucketError struct {
	Message string  `json:"Message"`
	Details *string `json:"Details,omitempty"`
}

type BucketOrder

type BucketOrder struct {
	Field     BucketOrderField     `json:"field"`
	Direction model.OrderDirection `json:"direction"`
}

type BucketOrderField

type BucketOrderField string
const (
	BucketOrderFieldName        BucketOrderField = "NAME"
	BucketOrderFieldEnvironment BucketOrderField = "ENVIRONMENT"
)

func (BucketOrderField) IsValid

func (e BucketOrderField) IsValid() bool

func (BucketOrderField) MarshalGQL

func (e BucketOrderField) MarshalGQL(w io.Writer)

func (BucketOrderField) String

func (e BucketOrderField) String() string

func (*BucketOrderField) UnmarshalGQL

func (e *BucketOrderField) UnmarshalGQL(v interface{}) error

type BucketState

type BucketState string
const (
	BucketStateHealthy BucketState = "HEALTHY"
	BucketStateError   BucketState = "ERROR"
	BucketStateUnknown BucketState = "UNKNOWN"
)

func (BucketState) IsValid

func (e BucketState) IsValid() bool

func (BucketState) MarshalGQL

func (e BucketState) MarshalGQL(w io.Writer)

func (BucketState) String

func (e BucketState) String() string

func (*BucketState) UnmarshalGQL

func (e *BucketState) UnmarshalGQL(v interface{}) error

type BucketStatus

type BucketStatus struct {
	State  BucketState    `json:"state"`
	Errors []*BucketError `json:"errors"`
}

type TeamInventoryCountBuckets

type TeamInventoryCountBuckets struct {
	Total int
}

Jump to

Keyboard shortcuts

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