config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIOpts

type APIOpts struct {
	Listen       string `yaml:"listen"`
	CORSAllowAll bool   `yaml:"cors-allow-all"`
}

func (*APIOpts) UnmarshalYAML

func (a *APIOpts) UnmarshalYAML(value *yaml.Node) error

type Config

type Config struct {
	Registries      []*RegistryOpts     `yaml:"registries"`
	WebhookListener WebhookListenerOpts `yaml:"webhook-listener"`
	PubSubListener  PubSubListenerOpts  `yaml:"pubsub-listener"`
	Indexer         IndexerOpts         `yaml:"indexer"`
	API             APIOpts             `yaml:"api"`
}

func DefaultConfig

func DefaultConfig() *Config

DefaultConfig creates a default configuration with sane defaults

func (*Config) UnmarshalYAML

func (c *Config) UnmarshalYAML(value *yaml.Node) error

type Credentials

type Credentials struct {
	Username string
	Password string
}

type IndexerOpts

type IndexerOpts struct {
	QueueLength    uint64 `yaml:"queue-length"`
	StateFile      string `yaml:"state-file"`
	IndexOnStartup bool   `yaml:"index-on-startup"`
}

func (*IndexerOpts) GetStateStorage

func (i *IndexerOpts) GetStateStorage(ctx context.Context) (index.StateStorage, error)

func (*IndexerOpts) UnmarshalYAML

func (i *IndexerOpts) UnmarshalYAML(value *yaml.Node) error

type PubSubListenerOpts

type PubSubListenerOpts struct {
	Projects     []string
	Prefixes     []string
	Subscription string
}

func (*PubSubListenerOpts) Enabled

func (p *PubSubListenerOpts) Enabled() bool

func (*PubSubListenerOpts) UnmarshalYAML

func (p *PubSubListenerOpts) UnmarshalYAML(value *yaml.Node) error

type RegistryOpts

type RegistryOpts struct {
	BaseURL     *url.URL
	Prefixes    []string
	Credentials *Credentials
}

func (*RegistryOpts) GetCredentialStore

func (c *RegistryOpts) GetCredentialStore(context context.Context) (docker_auth.CredentialStore, error)

func (*RegistryOpts) MarshalYAML

func (r *RegistryOpts) MarshalYAML() (interface{}, error)

func (*RegistryOpts) UnmarshalYAML

func (c *RegistryOpts) UnmarshalYAML(value *yaml.Node) error

type WebhookListenerOpts

type WebhookListenerOpts struct {
	Registry string
	Listen   string
}

func (*WebhookListenerOpts) Enabled

func (w *WebhookListenerOpts) Enabled() bool

func (*WebhookListenerOpts) UnmarshalYAML

func (w *WebhookListenerOpts) UnmarshalYAML(value *yaml.Node) error

Jump to

Keyboard shortcuts

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