jx/internal/data/identifier.go
Matthew Rich c34a76981e
Some checks are pending
Lint / golangci-lint (push) Waiting to run
Declarative Tests / test (push) Waiting to run
Declarative Tests / build-fedora (push) Waiting to run
Declarative Tests / build-ubuntu-focal (push) Waiting to run
move source/target converters to fan pkg
2024-09-19 08:03:23 +00:00

33 lines
556 B
Go

// Copyright 2024 Matthew Rich <matthewrich.conf@gmail.com>. All rights reserved.
package data
import (
"errors"
"net/url"
)
var (
ErrInvalidURI error = errors.New("Invalid URI")
)
type Identifier interface {
URI() string
SetURI(string) error
SetParsedURI(*url.URL) error
}
type DocumentElement interface {
Identifier
}
type Selector[Item comparable] func(r Item) bool
type ResourceSelector Selector[Resource]
type DeclarationSelector Selector[Declaration]
type BlockSelector Selector[Block]
type ElementSelector Selector[DocumentElement]