config

package
v0.0.0-...-63bc965 Latest Latest
Warning

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

Go to latest
Published: May 20, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetOption

func GetOption[T any, F Setter[T]](opts Options, setter F) (T, bool)

Types

type Config

type Config struct {
	Context context.Context

	// Network options
	Dialer    ContextDialer
	TLSConfig *tls.Config
	KeepAlive time.Duration
	Timeout   time.Duration
	Pipeline  int

	// EPP options
	Versions              []string
	Objects               []string
	Extensions            []string
	UnannouncedExtensions []string
	Schemas               schema.Schemas
}

Config is an optimized form of EPP options, suitable for passing via the call stack.

func (*Config) Clone

func (cfg *Config) Clone() *Config

Clone returns a 1-level deep clone of cfg. Slice members and tls.Config will be cloned.

func (*Config) EPPOptions

func (*Config) EPPOptions(internal.Internal)

func (*Config) Join

func (cfg *Config) Join(opts ...Options)

type Context

type Context struct{ context.Context } // epp.WithContext

func (Context) EPPOptions

func (Context) EPPOptions(internal.Internal)

type ContextDialer

type ContextDialer interface {
	DialContext(ctx context.Context, network, addr string) (net.Conn, error)
}

ContextDialer is any type with a DialContext method that returns (net.Conn, [error]).

type Dialer

type Dialer struct{ ContextDialer } // epp.WithDialer

func (Dialer) EPPOptions

func (Dialer) EPPOptions(internal.Internal)

type KeepAlive

type KeepAlive time.Duration // epp.WithKeepAlive

func (KeepAlive) EPPOptions

func (KeepAlive) EPPOptions(internal.Internal)

type Options

type Options interface {
	EPPOptions(internal.Internal)
}

type Pipeline

type Pipeline int // epp.WithPipeline

func (Pipeline) EPPOptions

func (Pipeline) EPPOptions(internal.Internal)

type Schemas

type Schemas schema.Schemas // epp.WithSchema

func (Schemas) EPPOptions

func (Schemas) EPPOptions(internal.Internal)

type Setter

type Setter[T any] interface {
	Setter1[T] | SetterN[T]
}

type Setter1

type Setter1[T any] func(T) Options

type SetterN

type SetterN[T any] func(...T) Options

type TLSConfig

type TLSConfig tls.Config // epp.WithTLS

func (*TLSConfig) EPPOptions

func (*TLSConfig) EPPOptions(internal.Internal)

type Timeout

type Timeout time.Duration // epp.WithTimeout

func (Timeout) EPPOptions

func (Timeout) EPPOptions(internal.Internal)

Jump to

Keyboard shortcuts

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