...

Package subs

import "vminko.org/dscuss/subs"
Overview
Index

Overview ▾

Constants

TBD: precompile regular expressions for performance benefits

const (
    MaxTagLen        = 24
    MaxTopicCapacity = 8
)
const (
    MaxSubscriptionLen = 32
)

type Subscriptions

type Subscriptions []Topic

func Read

func Read(r io.Reader) (Subscriptions, error)

func ReadString

func ReadString(s string) (Subscriptions, error)

func (Subscriptions) AddTopic

func (s Subscriptions) AddTopic(t Topic) Subscriptions

func (Subscriptions) Contains

func (s Subscriptions) Contains(target Topic) bool

func (Subscriptions) Copy

func (s Subscriptions) Copy() Subscriptions

func (Subscriptions) Covers

func (s Subscriptions) Covers(target Topic) bool

func (Subscriptions) Diff

func (s Subscriptions) Diff(a Subscriptions) Subscriptions

func (Subscriptions) IsValid

func (s Subscriptions) IsValid() bool

func (Subscriptions) String

func (s Subscriptions) String() string

func (Subscriptions) StringSlice

func (s Subscriptions) StringSlice() []string

func (Subscriptions) ToCombinations

func (s Subscriptions) ToCombinations() Subscriptions

type Topic

type Topic []string

func NewTopic

func NewTopic(str string) (Topic, error)

func (Topic) ContainsTag

func (t Topic) ContainsTag(target string) bool

func (Topic) ContainsTopic

func (t Topic) ContainsTopic(subtop Topic) bool

func (Topic) Copy

func (t Topic) Copy() Topic

func (Topic) IsEqual

func (t Topic) IsEqual(target Topic) bool

func (Topic) IsValid

func (t Topic) IsValid() bool

func (Topic) Remove

func (t Topic) Remove(target string) (Topic, error)

func (Topic) String

func (t Topic) String() string