Documentation ¶
Index ¶
- type T
- func (t *T) AddCap(i, c no) (tt *T)
- func (t *T) Append(ttt ...*T) (tt *T)
- func (t *T) AppendSlice(b ...by) (tt *T)
- func (t *T) AppendTags(ttt ...*tag.T) (tt *T)
- func (t *T) AppendTo(n no, b ...by) (tt *T)
- func (t *T) AppendUnique(tag *tag.T) *T
- func (t *T) Clone() (c *T)
- func (t *T) Contains(filterTags *T) (has bo)
- func (t *T) ContainsAny(tagName by, values *tag.T) bo
- func (t *T) ContainsProtectedMarker() (does bo)
- func (t *T) Equal(ta *T) bo
- func (t *T) F() (tt []*tag.T)
- func (t *T) FilterOut(tagPrefix []by) *T
- func (t *T) GetAll(tagPrefix *tag.T) *T
- func (t *T) GetFirst(tagPrefix *tag.T) *tag.T
- func (t *T) GetLast(tagPrefix *tag.T) *tag.T
- func (t *T) Intersects(f *T) (has bo)
- func (t *T) Len() (l no)
- func (t *T) Less(i, j no) (less bo)
- func (t *T) Marshal(dst by) (b by)
- func (t *T) MarshalTo(dst by) by
- func (t *T) N(i no) (tt *tag.T)
- func (t *T) Scan(src any) (err er)
- func (t *T) Swap(i, j no)
- func (t *T) ToStringSlice() (b [][]st)
- func (t *T) Unmarshal(b by) (r by, err er)
- func (t *T) Value() (tt []*tag.T)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type T ¶
type T struct {
// contains filtered or unexported fields
}
T is a list of T - which are lists of string elements with ordering and no uniqueness constraint (not a set).
func NewWithCap ¶ added in v1.0.4
func NewWithCap(c no) (t *T)
func (*T) AppendSlice ¶ added in v1.2.0
AppendSlice just appends a slice of slices of bytes into the tags. Like AppendTo but without the position specifier. todo: this is a terribly constructed API innit.
func (*T) AppendUnique ¶
AppendUnique appends a tag if it doesn't exist yet, otherwise does nothing. the uniqueness comparison is done based only on the first 2 elements of the tag.
func (*T) ContainsAny ¶ added in v1.0.13
ContainsAny returns true if any of the strings given in `values` matches any of the tag elements.
func (*T) ContainsProtectedMarker ¶ added in v1.2.17
func (t *T) ContainsProtectedMarker() (does bo)
ContainsProtectedMarker returns true if an event may only be published to the relay by a user authed with the same pubkey as in the event. This is for implementing relayinfo.NIP70.
func (*T) GetFirst ¶
GetFirst gets the first tag in tags that matches the prefix, see [T.StartsWith]
func (*T) Intersects ¶
Intersects returns true if a filter tags.T has a match. This means the second character of the filter tag key matches, (ignoring the stupid # prefix in the filter) and one of the following values in the tag matches the first tag of this tag.
func (*T) Less ¶
func (t *T) Less(i, j no) (less bo)
Less returns which tag's first element is first lexicographically
func (*T) MarshalTo ¶
func (t *T) MarshalTo(dst by) by
MarshalTo appends the JSON encoded byte of T as [][]string to dst. String escaping is as described in RFC8259.
func (*T) Scan ¶
Scan parses a string or raw bytes that should be a string and embeds the values into the tags variable from which this method is invoked.
todo: wut is this?
func (*T) ToStringSlice ¶
func (t *T) ToStringSlice() (b [][]st)