common

package
v0.0.0-...-bd0960d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 28, 2023 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Root     Subdir
	MediaDir string `yaml:"media_dir"`
}

func (*Config) ThreadIDs

func (cfg *Config) ThreadIDs() []string

func (*Config) ThreadPages

func (cfg *Config) ThreadPages() map[string]Thread

type PageMapEntry

type PageMapEntry struct {
	Name string
	Page YamlThread
}

type RenderConfig

type RenderConfig struct {
	MergeUpperCaseAfterEllipsis bool `yaml:"merge_upper_case_after_ellipsis"`
	MergeUnlessEndsWithPeriod   bool `yaml:"merge_unless_ends_with_period"`
}

type RequestConfig

type RequestConfig struct {
	Expansions  []string `json:",omitempty"`
	TweetFields []string `json:",omitempty"`
	MediaFields []string `json:",omitempty"`
	CustomFlags []string `json:",omitmepty"`
}

func (RequestConfig) Equal

func (c RequestConfig) Equal(other RequestConfig) bool

func (RequestConfig) QueryParams

func (c RequestConfig) QueryParams() url.Values

type Subdir

type Subdir struct {
	Title       string
	Description string
	Config      SubdirConfig
	Subdirs     YamlSubdirMap `yaml:",omitempty"`
	Pages       YamlPageMap   `yaml:",inline,omitempty"`
}

func (*Subdir) ThreadIDs

func (s *Subdir) ThreadIDs() []string

func (*Subdir) ThreadPages

func (s *Subdir) ThreadPages() map[string]Thread

type SubdirConfig

type SubdirConfig struct {
	CollapseInParent bool `yaml:"collapse_in_parent"`
}

type SubdirMapEntry

type SubdirMapEntry struct {
	Name   string
	Subdir Subdir
}

type Thread

type Thread struct {
	ThreadID string `yaml:"thread_id"`
	Title    string
	Config   RenderConfig
}

type YamlPageMap

type YamlPageMap struct {
	Entries []PageMapEntry
}

func (*YamlPageMap) UnmarshalYAML

func (m *YamlPageMap) UnmarshalYAML(value *yaml.Node) error

type YamlSubdirMap

type YamlSubdirMap []SubdirMapEntry

func (*YamlSubdirMap) UnmarshalYAML

func (m *YamlSubdirMap) UnmarshalYAML(value *yaml.Node) error

type YamlThread

type YamlThread struct {
	Thread `yaml:",inline"`
}

func (YamlThread) MarshalYAML

func (t YamlThread) MarshalYAML() (interface{}, error)

func (*YamlThread) UnmarshalYAML

func (t *YamlThread) UnmarshalYAML(value *yaml.Node) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL