mapocirepoattr

package
v0.10.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	ATTR_KEY   = "github.com/mandelsoft/ocm/mapocirepo"
	ATTR_SHORT = "mapocirepo"
)
View Source
const (
	NoneMode      = "none"
	HashMode      = "hash"
	ShortHashMode = "shortHash"
	MappingMode   = "mapping"
)

Variables

This section is empty.

Functions

func Set

func Set(ctx datacontext.Context, a *Attribute) error

Types

type Attribute

type Attribute struct {
	Mode           string            `json:"mode"`
	Always         bool              `json:"always,omitempty"`
	Prefix         *string           `json:"prefix,omitempty"`
	PrefixMappings map[string]string `json:"prefixMappings,omitempty"`
}

func Get

func Get(ctx datacontext.Context) *Attribute

func (*Attribute) Copy

func (a *Attribute) Copy() *Attribute

func (*Attribute) Hash

func (a *Attribute) Hash(name string, short bool) string

func (*Attribute) Map

func (a *Attribute) Map(name string) string

func (*Attribute) MapPrefix

func (a *Attribute) MapPrefix(name string) string

type AttributeType

type AttributeType struct{}

func (AttributeType) Decode

func (a AttributeType) Decode(data []byte, unmarshaller runtime.Unmarshaler) (interface{}, error)

func (AttributeType) Description

func (a AttributeType) Description() string

func (AttributeType) Encode

func (a AttributeType) Encode(v interface{}, marshaller runtime.Marshaler) ([]byte, error)

func (AttributeType) Name

func (a AttributeType) Name() string

Jump to

Keyboard shortcuts

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