Documentation ¶
Index ¶
- Constants
- func EnsureCustomPropertyHasValue(ctx context.Context, pr CustomProperty, body []byte) (bool, error)
- func RegisterCustomProperty(ctx context.Context, scheme string, init_func CustomPropertyInitializationFunc) error
- func Schemes() []string
- type CustomProperty
- type CustomPropertyInitializationFunc
- type CustomStringProperty
Constants ¶
View Source
const CUSTOM_STRING_PROPERTY string = "string"
Variables ¶
This section is empty.
Functions ¶
func RegisterCustomProperty ¶
func RegisterCustomProperty(ctx context.Context, scheme string, init_func CustomPropertyInitializationFunc) error
RegisterCustom registers 'scheme' as a key pointing to 'init_func' in an internal lookup table used to create new `CustomProperty` instances by the `NewCustom` method.
Types ¶
type CustomProperty ¶
type CustomProperty interface { Name() string Type() string Required() bool CustomElement() string }
func NewCustomProperty ¶
func NewCustomProperty(ctx context.Context, uri string) (CustomProperty, error)
NewCustom returns a new `CustomProperty` instance configured by 'uri'. The value of 'uri' is parsed as a `url.URL` and its scheme is used as the key for a corresponding `CustomInitializationFunc` function used to instantiate the new `Custom`. It is assumed that the scheme (and initialization function) have been registered by the `RegisterCustom` method.
func NewCustomStringProperty ¶
func NewCustomStringProperty(ctx context.Context, uri string) (CustomProperty, error)
type CustomPropertyInitializationFunc ¶
type CustomPropertyInitializationFunc func(ctx context.Context, uri string) (CustomProperty, error)
CustomInitializationFunc is a function defined by individual custom package and used to create an instance of that custom
type CustomStringProperty ¶
type CustomStringProperty struct { CustomProperty // contains filtered or unexported fields }
func (*CustomStringProperty) CustomElement ¶
func (pr *CustomStringProperty) CustomElement() string
func (*CustomStringProperty) Name ¶
func (pr *CustomStringProperty) Name() string
func (*CustomStringProperty) Required ¶
func (pr *CustomStringProperty) Required() bool
func (*CustomStringProperty) Type ¶
func (pr *CustomStringProperty) Type() string
Click to show internal directories.
Click to hide internal directories.