Documentation ¶
Index ¶
- func Render(tagName string, tagClose bool, attrs []Attr) template.HTML
- func RenderText(tagName string, attrs []Attr, tagContent string) template.HTML
- type A
- type Attr
- type BoolAttr
- func (value BoolAttr) Append(out []Attr, attrName string) []Attr
- func (value BoolAttr) AppendText(out []Attr, attrName string, attrValue string) []Attr
- func (value BoolAttr) GoString() string
- func (value BoolAttr) MarshalJSON() ([]byte, error)
- func (value BoolAttr) MarshalText() ([]byte, error)
- func (value *BoolAttr) Parse(input string) error
- func (value BoolAttr) String() string
- func (value *BoolAttr) UnmarshalJSON(input []byte) error
- func (value *BoolAttr) UnmarshalText(input []byte) error
- type CrossOriginAttr
- func (enum CrossOriginAttr) Append(out []Attr, attrName string) []Attr
- func (enum CrossOriginAttr) GoString() string
- func (enum CrossOriginAttr) IsPresent() bool
- func (enum CrossOriginAttr) IsValid() bool
- func (enum CrossOriginAttr) MarshalText() ([]byte, error)
- func (enum *CrossOriginAttr) Parse(input string) error
- func (enum CrossOriginAttr) String() string
- func (enum *CrossOriginAttr) UnmarshalText(input []byte) error
- type FetchPriorityAttr
- func (enum FetchPriorityAttr) Append(out []Attr, attrName string) []Attr
- func (enum FetchPriorityAttr) GoString() string
- func (enum FetchPriorityAttr) IsPresent() bool
- func (enum FetchPriorityAttr) IsValid() bool
- func (enum FetchPriorityAttr) MarshalText() ([]byte, error)
- func (enum *FetchPriorityAttr) Parse(input string) error
- func (enum FetchPriorityAttr) String() string
- func (enum *FetchPriorityAttr) UnmarshalText(input []byte) error
- type Link
- type LinkAsAttr
- func (enum LinkAsAttr) Append(out []Attr, attrName string) []Attr
- func (enum LinkAsAttr) GoString() string
- func (enum LinkAsAttr) IsPresent() bool
- func (enum LinkAsAttr) IsValid() bool
- func (enum LinkAsAttr) MarshalText() ([]byte, error)
- func (enum *LinkAsAttr) Parse(input string) error
- func (enum LinkAsAttr) String() string
- func (enum *LinkAsAttr) UnmarshalText(input []byte) error
- type Meta
- type MetaType
- func (enum MetaType) Append(out []Attr, name string) []Attr
- func (enum MetaType) GoString() string
- func (enum MetaType) IsPresent() bool
- func (enum MetaType) IsValid() bool
- func (enum MetaType) MarshalText() ([]byte, error)
- func (enum *MetaType) Parse(input string) error
- func (enum MetaType) String() string
- func (enum *MetaType) UnmarshalText(input []byte) error
- type ReferrerPolicyAttr
- func (enum ReferrerPolicyAttr) Append(out []Attr, attrName string) []Attr
- func (enum ReferrerPolicyAttr) GoString() string
- func (enum ReferrerPolicyAttr) IsPresent() bool
- func (enum ReferrerPolicyAttr) IsValid() bool
- func (enum ReferrerPolicyAttr) MarshalText() ([]byte, error)
- func (enum *ReferrerPolicyAttr) Parse(input string) error
- func (enum ReferrerPolicyAttr) String() string
- func (enum *ReferrerPolicyAttr) UnmarshalText(input []byte) error
- type Script
- type SizesAttr
- func (value SizesAttr) Append(out []Attr, attrName string) []Attr
- func (value SizesAttr) GoString() string
- func (value SizesAttr) IsPresent() bool
- func (value SizesAttr) IsValid() bool
- func (value SizesAttr) MarshalJSON() ([]byte, error)
- func (value SizesAttr) MarshalText() ([]byte, error)
- func (value *SizesAttr) Parse(input string) error
- func (value SizesAttr) String() string
- func (value *SizesAttr) UnmarshalJSON(input []byte) error
- func (value *SizesAttr) UnmarshalText(input []byte) error
- type StringAttr
- func (value StringAttr) Append(out []Attr, attrName string, isMandatory bool) []Attr
- func (value StringAttr) GoString() string
- func (value StringAttr) IsPresent() bool
- func (value StringAttr) MarshalText() ([]byte, error)
- func (value *StringAttr) Parse(input string) error
- func (value StringAttr) String() string
- func (value *StringAttr) UnmarshalText(input []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type A ¶
type A struct { Text string `json:"text"` Href StringAttr `json:"href"` HrefLang StringAttr `json:"hrefLang"` Type StringAttr `json:"type"` Rel StringAttr `json:"rel"` Ping StringAttr `json:"ping"` ReferrerPolicy ReferrerPolicyAttr `json:"referrerPolicy"` }
func (A) Attributes ¶
type BoolAttr ¶
type BoolAttr bool
func (BoolAttr) AppendText ¶
func (BoolAttr) MarshalJSON ¶
func (BoolAttr) MarshalText ¶
func (*BoolAttr) UnmarshalJSON ¶
func (*BoolAttr) UnmarshalText ¶
type CrossOriginAttr ¶
type CrossOriginAttr byte
const ( CrossOrigin_None CrossOriginAttr = iota CrossOrigin_Anonymous CrossOrigin_UseCredentials )
func (CrossOriginAttr) Append ¶
func (enum CrossOriginAttr) Append(out []Attr, attrName string) []Attr
func (CrossOriginAttr) GoString ¶
func (enum CrossOriginAttr) GoString() string
func (CrossOriginAttr) IsPresent ¶
func (enum CrossOriginAttr) IsPresent() bool
func (CrossOriginAttr) IsValid ¶
func (enum CrossOriginAttr) IsValid() bool
func (CrossOriginAttr) MarshalText ¶
func (enum CrossOriginAttr) MarshalText() ([]byte, error)
func (*CrossOriginAttr) Parse ¶
func (enum *CrossOriginAttr) Parse(input string) error
func (CrossOriginAttr) String ¶
func (enum CrossOriginAttr) String() string
func (*CrossOriginAttr) UnmarshalText ¶
func (enum *CrossOriginAttr) UnmarshalText(input []byte) error
type FetchPriorityAttr ¶
type FetchPriorityAttr byte
const ( FetchPriority_None FetchPriorityAttr = iota FetchPriority_High FetchPriority_Low FetchPriority_Auto )
func (FetchPriorityAttr) Append ¶
func (enum FetchPriorityAttr) Append(out []Attr, attrName string) []Attr
func (FetchPriorityAttr) GoString ¶
func (enum FetchPriorityAttr) GoString() string
func (FetchPriorityAttr) IsPresent ¶
func (enum FetchPriorityAttr) IsPresent() bool
func (FetchPriorityAttr) IsValid ¶
func (enum FetchPriorityAttr) IsValid() bool
func (FetchPriorityAttr) MarshalText ¶
func (enum FetchPriorityAttr) MarshalText() ([]byte, error)
func (*FetchPriorityAttr) Parse ¶
func (enum *FetchPriorityAttr) Parse(input string) error
func (FetchPriorityAttr) String ¶
func (enum FetchPriorityAttr) String() string
func (*FetchPriorityAttr) UnmarshalText ¶
func (enum *FetchPriorityAttr) UnmarshalText(input []byte) error
type Link ¶
type Link struct { Href StringAttr `json:"href"` HrefLang StringAttr `json:"hrefLang"` Type StringAttr `json:"type"` Rel StringAttr `json:"rel"` As LinkAsAttr `json:"as"` Title StringAttr `json:"title"` Media StringAttr `json:"media"` Sizes SizesAttr `json:"sizes"` ImageSizes SizesAttr `json:"imageSizes"` ImageSrcSet StringAttr `json:"imageSrcSet"` FetchPriority FetchPriorityAttr `json:"fetchPriority"` CrossOrigin CrossOriginAttr `json:"crossOrigin"` ReferrerPolicy ReferrerPolicyAttr `json:"referrerPolicy"` Integrity StringAttr `json:"integrity"` Blocking BoolAttr `json:"blocking"` }
func (Link) Attributes ¶
type LinkAsAttr ¶
type LinkAsAttr byte
const ( LinkAs_None LinkAsAttr = iota LinkAs_Audio LinkAs_Document LinkAs_Embed LinkAs_Fetch LinkAs_Font LinkAs_Image LinkAs_Object LinkAs_Script LinkAs_Style LinkAs_Track LinkAs_Video LinkAs_Worker )
func (LinkAsAttr) GoString ¶
func (enum LinkAsAttr) GoString() string
func (LinkAsAttr) IsPresent ¶
func (enum LinkAsAttr) IsPresent() bool
func (LinkAsAttr) IsValid ¶
func (enum LinkAsAttr) IsValid() bool
func (LinkAsAttr) MarshalText ¶
func (enum LinkAsAttr) MarshalText() ([]byte, error)
func (*LinkAsAttr) Parse ¶
func (enum *LinkAsAttr) Parse(input string) error
func (LinkAsAttr) String ¶
func (enum LinkAsAttr) String() string
func (*LinkAsAttr) UnmarshalText ¶
func (enum *LinkAsAttr) UnmarshalText(input []byte) error
type Meta ¶
type Meta struct { Type MetaType `json:"type"` Name StringAttr `json:"name"` Content StringAttr `json:"content"` Media StringAttr `json:"media"` }
func (Meta) Attributes ¶
type ReferrerPolicyAttr ¶
type ReferrerPolicyAttr byte
const ( ReferrerPolicy_None ReferrerPolicyAttr = iota ReferrerPolicy_NoReferrer ReferrerPolicy_NoReferrerWhenDowngrade ReferrerPolicy_Origin ReferrerPolicy_OriginWhenCrossOrigin ReferrerPolicy_SameOrigin ReferrerPolicy_StrictOrigin ReferrerPolicy_StrictOriginWhenCrossOrigin ReferrerPolicy_UnsafeURL )
func (ReferrerPolicyAttr) Append ¶
func (enum ReferrerPolicyAttr) Append(out []Attr, attrName string) []Attr
func (ReferrerPolicyAttr) GoString ¶
func (enum ReferrerPolicyAttr) GoString() string
func (ReferrerPolicyAttr) IsPresent ¶
func (enum ReferrerPolicyAttr) IsPresent() bool
func (ReferrerPolicyAttr) IsValid ¶
func (enum ReferrerPolicyAttr) IsValid() bool
func (ReferrerPolicyAttr) MarshalText ¶
func (enum ReferrerPolicyAttr) MarshalText() ([]byte, error)
func (*ReferrerPolicyAttr) Parse ¶
func (enum *ReferrerPolicyAttr) Parse(input string) error
func (ReferrerPolicyAttr) String ¶
func (enum ReferrerPolicyAttr) String() string
func (*ReferrerPolicyAttr) UnmarshalText ¶
func (enum *ReferrerPolicyAttr) UnmarshalText(input []byte) error
type Script ¶
type Script struct { Src StringAttr `json:"src"` Type StringAttr `json:"type"` FetchPriority FetchPriorityAttr `json:"fetchPriority"` CrossOrigin CrossOriginAttr `json:"crossOrigin"` ReferrerPolicy ReferrerPolicyAttr `json:"referrerPolicy"` Nonce StringAttr `json:"nonce"` Integrity StringAttr `json:"integrity"` Blocking BoolAttr `json:"blocking"` Async BoolAttr `json:"async"` Defer BoolAttr `json:"defer"` NoModule BoolAttr `json:"noModule"` }
func (Script) Attributes ¶
type SizesAttr ¶
type SizesAttr []string
func (SizesAttr) MarshalJSON ¶
func (SizesAttr) MarshalText ¶
func (*SizesAttr) UnmarshalJSON ¶
func (*SizesAttr) UnmarshalText ¶
type StringAttr ¶
type StringAttr string
func (StringAttr) Append ¶
func (value StringAttr) Append(out []Attr, attrName string, isMandatory bool) []Attr
func (StringAttr) GoString ¶
func (value StringAttr) GoString() string
func (StringAttr) IsPresent ¶
func (value StringAttr) IsPresent() bool
func (StringAttr) MarshalText ¶
func (value StringAttr) MarshalText() ([]byte, error)
func (*StringAttr) Parse ¶
func (value *StringAttr) Parse(input string) error
func (StringAttr) String ¶
func (value StringAttr) String() string
func (*StringAttr) UnmarshalText ¶
func (value *StringAttr) UnmarshalText(input []byte) error
Click to show internal directories.
Click to hide internal directories.