indexer

package
v0.20.3 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidArgument = errors.New("invalid argument")
	ErrNotFound        = errors.New("not found")
)

Definitions of common error types used by this library.

Functions

func IsInvalidArgument

func IsInvalidArgument(err error) bool

IsInvalidArgument returns true if the error is due to an invalid argument

func IsNotFound

func IsNotFound(err error) bool

IsNotFound returns true if the error is due to a missing object

Types

type Indexer

type Indexer interface {
	// Get retrieves the index
	Get(ctx context.Context) (*api.Index, error)
}

Indexer is the interface that an indexer should implement

func NewOciIndexer

func NewOciIndexer(opts ...OciIndexerOpt) (Indexer, error)

NewOciIndexer returns a new OCI-based indexer

type OciIndexerOpt

type OciIndexerOpt func(opts *ociIndexerOpts)

OciIndexerOpt allows setting configuration options

func WithBasicAuth

func WithBasicAuth(user, pass string) OciIndexerOpt

WithBasicAuth configures basic authentication for the OCI host

opt := WithBasicAuth("user", "pass")

func WithHost

func WithHost(h string) OciIndexerOpt

WithHost configures the OCI host

opt := WithHost("my.oci.domain")

func WithIndexRef

func WithIndexRef(r string) OciIndexerOpt

WithIndexRef configures the charts index OCI reference instead of letting the library using the default host/index:latest one.

opt := WithIndexRef("my.oci.domain/index:prod")

func WithInsecure

func WithInsecure() OciIndexerOpt

WithInsecure configures insecure connection

opt := WithInsecure()

Directories

Path Synopsis
Package api provides APIs to index charts
Package api provides APIs to index charts

Jump to

Keyboard shortcuts

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