mapper

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrInvalidMapper

func ErrInvalidMapper(name string) error

func ErrMapConfigSetup

func ErrMapConfigSetup(message string) error

func ErrOperationNotSupported

func ErrOperationNotSupported(operation string) error

func Sanitize

func Sanitize(m Mapper, pair *types.PathUrlPair)

Types

type Mapper

type Mapper interface {
	MapperIdentityProvider
	Readonly() bool

	GetUrl(path string) (*types.PathUrlPair, error)
	ListUrls() (types.PathUrlPairList, error)
	PutUrl(pair *types.PathUrlPair) (*types.PathUrlPair, error)
	DeleteUrl(path string) error

	Teardown() error
}

type MapperConfigurer

type MapperConfigurer interface {
	MapperIdentityProvider
	GetMapper() (Mapper, error)
	Singleton() bool
}

type MapperIdentityProvider

type MapperIdentityProvider interface {
	GetType() string
	GetName() string
}

type MapperManager

type MapperManager struct {
	// contains filtered or unexported fields
}

func NewMapperManager

func NewMapperManager(persistorName string, mapConfigs []MapperConfigurer) (*MapperManager, error)

func (*MapperManager) DeleteUrl

func (m *MapperManager) DeleteUrl(path string) error

func (*MapperManager) GetUrl

func (m *MapperManager) GetUrl(path string, incrementCounter bool) (*types.PathUrlPair, error)

func (*MapperManager) ListUrls

func (m *MapperManager) ListUrls() (types.PathUrlPairList, error)

func (*MapperManager) PutUrl

func (m *MapperManager) PutUrl(pair *types.PathUrlPair) (*types.PathUrlPair, error)

func (*MapperManager) Teardown

func (m *MapperManager) Teardown() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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