Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetBasePath ¶
Types ¶
type Config ¶
type Config struct { Files []File `yaml:"files"` WhiteListExt []string `yaml:"white-list-external"` WhiteListInt []string `yaml:"white-list-internal"` BlackList []string `yaml:"black-list"` Timeout int `yaml:"timeout"` ReguestRepeats int8 `yaml:"request-repeats"` AllowRedirect bool `yaml:"allow-redirect"` AllowCodeBlocks bool `yaml:"allow-code-blocks"` IgnoreExternal bool `yaml:"ignore-external"` IgnoreInternal bool `yaml:"ignore-internal"` }
type FailedLinks ¶
type File ¶
type File struct { RelPath string `yaml:"path"` AbsPath string DirPath string Content string Links Links `yaml:"links"` Headers Headers Status bool Config *FileConfig `yaml:"config"` Stats *FileStats // contains filtered or unexported fields }
func (*File) ExtractHeaders ¶
func (*File) ExtractLinks ¶
func (*File) ExtractStats ¶
func (*File) ValidateLinks ¶
func (*File) WriteStats ¶
type FileConfig ¶
type FileConfig struct { WhiteListExt []string `yaml:"white-list-external"` WhiteListInt []string `yaml:"white-list-internal"` Timeout *int `yaml:"timeout"` ReguestRepeats *int8 `yaml:"request-repeats"` AllowRedirect *bool `yaml:"allow-redirect"` AllowCodeBlocks *bool `yaml:"allow-code-blocks"` IgnoreExternal *bool `yaml:"ignore-external"` IgnoreInternal *bool `yaml:"ignore-internal"` }
func NewFileConfig ¶
func NewFileConfig(filePath string, config *Config) *FileConfig
type FileStats ¶
type FileStats struct { SuccessLinks SuccessLinks FailedLinks FailedLinks }
func NewFileStats ¶
type FilesStats ¶
type FilesStats []*FileStats
func NewFilesStats ¶
func NewFilesStats(files Files) FilesStats
type Link ¶
type Link struct { RelPath string `yaml:"path"` AbsPath string Config *LinkConfig `yaml:"config"` TypeOf LinkType Result LinkResult }
type LinkConfig ¶ added in v0.0.3
type LinkConfig struct { Timeout *int `yaml:"timeout"` ReguestRepeats *int8 `yaml:"request-repeats"` AllowRedirect *bool `yaml:"allow-redirect"` }
func NewLinkConfig ¶ added in v0.0.4
func NewLinkConfig(link Link, file *File) *LinkConfig
type LinkResult ¶
type Links ¶
type Links []Link
func (Links) AppendConfig ¶ added in v0.0.4
func (Links) CheckStatus ¶
func (Links) RemoveWhiteLinks ¶
type Parser ¶
type Parser struct{}
type SuccessLinks ¶
type Validation ¶
type Validation struct { }
func (*Validation) ExternalLinks ¶
func (v *Validation) ExternalLinks(links Links) (Links, error)
func (*Validation) HashInternalLinks ¶
func (v *Validation) HashInternalLinks(links Links, headers Headers) (Links, error)
func (*Validation) InternalLink ¶
func (v *Validation) InternalLink(links Links) (Links, error)
Click to show internal directories.
Click to hide internal directories.