Documentation ¶
Index ¶
- Constants
- Variables
- func CheckDocTypeName(docType string, internal bool) error
- func CheckHandlerName(handler string) error
- func CreateDocName(docType, name string) string
- func CreateListenerName(handler, name string) string
- func IsDocTypeInternal(docType string) bool
- func ParseDocName(name string) (docType, docName string, err error)
- func ParseListenerName(listener string) (string, string)
Constants ¶
View Source
const ( // HandlerDocumentType is a reserved internal document type // use for special handler related documents HandlerDocumentType = InternalPrefix + "-handler" // HandlerRequeueProperty is used to signal that all listeners // of the given handler should trigger a change. This is used if // the handler code was changed and now all data must be processed again. HandlerRequeueProperty = "requeue" )
View Source
const ( // InternalPrefix is the prefix that each internal // document type must have. InternalPrefix = "jb" )
Variables ¶
View Source
var ( // ErrDocTypeNameReserved indicates that a reserved name was used // as a document type name. ErrDocTypeNameReserved = fmt.Errorf("document type which starts with %q is reserved", InternalPrefix) // ErrDocTypeNameInternal indicates that a document type that is ErrDocTypeNameInternal = fmt.Errorf("internal document type must has %q as a prefix", InternalPrefix) // ErrDocTypeNameInvalid indicates that the document type name is not valid // (e.g. contains invalid characters). ErrDocTypeNameInvalid = fmt.Errorf("document type must match pattern %q", docTypePatternRaw) )
View Source
var ( // ErrHandlerNameInvalid indicates that the handler name is not valid // (e.g. contains invalid characters). ErrHandlerNameInvalid = fmt.Errorf("handler must match pattern %q", handlerPatternRaw) )
Functions ¶
func CheckDocTypeName ¶
CheckDocTypeName checks if a docType name is valid
func CheckHandlerName ¶
CheckHandlerName checks if the handler name is valid
func CreateDocName ¶
CreateDocName creates a document name based of docType and docName
func CreateListenerName ¶
CreateListenerName creates a unique listener name for a given handler.
func IsDocTypeInternal ¶
IsDocTypeInternal checks if a document type is a internal reserved one.
func ParseDocName ¶
ParseDocName parses a DocName into docType and docName
func ParseListenerName ¶
ParseListenerName returns the handler of a listener.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.