chdl

package
v0.0.0-...-5ad7666 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2020 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnknownChan      = errors.New("unknown or unsupported chan")
	ErrInvalidURLFormat = errors.New("invalid chan url format")
)

Functions

func Detail

func Detail(u *url.URL) (board, thread string, err error)

func DetailChan4

func DetailChan4(u *url.URL) (board, thread string, err error)

func DetailChan7

func DetailChan7(u *url.URL) (board, thread string, err error)

func DetailChan8

func DetailChan8(u *url.URL) (board, thread string, err error)

Types

type Board

type Board interface {
	Board() string
	Thread(string) Thread
	Threads() ([]Thread, error)
	Page(int) ([]Thread, error)
	Posts() ([]Post, error)
	Files(bool) ([]File, error)
}

func New

func New(u *url.URL) (Board, error)

type Chan4

type Chan4 struct {
	// contains filtered or unexported fields
}

func NewChan4

func NewChan4(u *url.URL) (Chan4, error)

func (Chan4) Board

func (c4 Chan4) Board() string

func (Chan4) Files

func (c4 Chan4) Files(excludeExtras bool) (files []File, err error)

func (Chan4) Page

func (c4 Chan4) Page(i int) (threads []Thread, err error)

func (Chan4) Posts

func (c4 Chan4) Posts() (posts []Post, err error)

func (Chan4) Thread

func (c4 Chan4) Thread(thread string) Thread

func (Chan4) Threads

func (c4 Chan4) Threads() (threads []Thread, err error)

type Chan4File

type Chan4File struct {
	// contains filtered or unexported fields
}

func (Chan4File) Board

func (c4f Chan4File) Board() string

func (Chan4File) Extension

func (c4f Chan4File) Extension() string

func (Chan4File) Name

func (c4f Chan4File) Name() string

func (Chan4File) Thread

func (c4f Chan4File) Thread() string

func (Chan4File) URL

func (c4f Chan4File) URL() string

type Chan4Post

type Chan4Post struct {
	Name      json.Number `json:"tim,Number,omitempty"`
	Extension string      `json:"ext,omitempty"`
	// contains filtered or unexported fields
}

func (Chan4Post) Board

func (c4p Chan4Post) Board() string

func (Chan4Post) Files

func (c4p Chan4Post) Files(excludeExtras bool) (files []File)

func (Chan4Post) Thread

func (c4p Chan4Post) Thread() string

type Chan4Thread

type Chan4Thread struct {
	// contains filtered or unexported fields
}

func (Chan4Thread) Board

func (c4t Chan4Thread) Board() string

func (Chan4Thread) Files

func (c4t Chan4Thread) Files(excludeExtras bool) (files []File, err error)

func (Chan4Thread) Posts

func (c4t Chan4Thread) Posts() (posts []Post, err error)

func (Chan4Thread) Thread

func (c4t Chan4Thread) Thread() string

func (Chan4Thread) URL

func (c4t Chan4Thread) URL() string

type Chan7

type Chan7 struct {
	// contains filtered or unexported fields
}

func NewChan7

func NewChan7(u *url.URL) (Chan7, error)

func (Chan7) Board

func (c7 Chan7) Board() string

func (Chan7) Files

func (c7 Chan7) Files(excludeExtras bool) (files []File, err error)

func (Chan7) Page

func (c7 Chan7) Page(i int) (threads []Thread, err error)

func (Chan7) Posts

func (c7 Chan7) Posts() (posts []Post, err error)

func (Chan7) Thread

func (c7 Chan7) Thread(thread string) Thread

func (Chan7) Threads

func (c7 Chan7) Threads() (threads []Thread, err error)

type Chan7File

type Chan7File struct {
	// contains filtered or unexported fields
}

func (Chan7File) Board

func (c7f Chan7File) Board() string

func (Chan7File) Extension

func (c7f Chan7File) Extension() string

func (Chan7File) Name

func (c7f Chan7File) Name() string

func (Chan7File) Thread

func (c7f Chan7File) Thread() string

func (Chan7File) URL

func (c7f Chan7File) URL() string

type Chan7Post

type Chan7Post struct {
	Name      string
	Extension string
	Extras    []struct {
		Name      string
		Extension string
	}
	// contains filtered or unexported fields
}

func (Chan7Post) Board

func (c7p Chan7Post) Board() string

func (Chan7Post) Files

func (c7p Chan7Post) Files(excludeExtras bool) (files []File)

func (Chan7Post) Thread

func (c7p Chan7Post) Thread() string

type Chan7Thread

type Chan7Thread struct {
	// contains filtered or unexported fields
}

func (Chan7Thread) Board

func (c7t Chan7Thread) Board() string

func (Chan7Thread) Files

func (c7t Chan7Thread) Files(excludeExtras bool) (files []File, err error)

func (Chan7Thread) Posts

func (c7t Chan7Thread) Posts() (posts []Post, err error)

func (Chan7Thread) Thread

func (c7t Chan7Thread) Thread() string

func (Chan7Thread) URL

func (c7t Chan7Thread) URL() string

type Chan8

type Chan8 struct {
	// contains filtered or unexported fields
}

func NewChan8

func NewChan8(u *url.URL) (Chan8, error)

func (Chan8) Board

func (c8 Chan8) Board() string

func (Chan8) Files

func (c8 Chan8) Files(excludeExtras bool) (files []File, err error)

func (Chan8) Page

func (c8 Chan8) Page(i int) (threads []Thread, err error)

func (Chan8) Posts

func (c8 Chan8) Posts() (posts []Post, err error)

func (Chan8) Thread

func (c8 Chan8) Thread(thread string) Thread

func (Chan8) Threads

func (c8 Chan8) Threads() (threads []Thread, err error)

type Chan8File

type Chan8File struct {
	// contains filtered or unexported fields
}

func (Chan8File) Board

func (c8f Chan8File) Board() string

func (Chan8File) Extension

func (c8f Chan8File) Extension() string

func (Chan8File) Name

func (c8f Chan8File) Name() string

func (Chan8File) Thread

func (c8f Chan8File) Thread() string

func (Chan8File) URL

func (c8f Chan8File) URL() string

type Chan8Post

type Chan8Post struct {
	Name      json.Number `json:"tim,Number,omitempty"`
	Extension string      `json:"ext,omitempty"`
	Extras    []struct {
		Name      string `json:"tim,Number"`
		Extension string `json:"ext"`
	} `json:"extra_files,omitempty"`
	// contains filtered or unexported fields
}

func (Chan8Post) Board

func (c8p Chan8Post) Board() string

func (Chan8Post) Files

func (c8p Chan8Post) Files(excludeExtras bool) (files []File)

func (Chan8Post) Thread

func (c8p Chan8Post) Thread() string

type Chan8Thread

type Chan8Thread struct {
	// contains filtered or unexported fields
}

func (Chan8Thread) Board

func (c8t Chan8Thread) Board() string

func (Chan8Thread) Files

func (c8t Chan8Thread) Files(excludeExtras bool) (files []File, err error)

func (Chan8Thread) Posts

func (c8t Chan8Thread) Posts() (posts []Post, err error)

func (Chan8Thread) Thread

func (c8t Chan8Thread) Thread() string

func (Chan8Thread) URL

func (c8t Chan8Thread) URL() string

type File

type File interface {
	URL() string
	Board() string
	Thread() string
	Name() string
	Extension() string
}

type Post

type Post interface {
	Board() string
	Thread() string
	Files(bool) []File
}

type Thread

type Thread interface {
	URL() string
	Board() string
	Thread() string
	Posts() ([]Post, error)
	Files(bool) ([]File, error)
}

Jump to

Keyboard shortcuts

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