scrapper

package
v0.0.0-...-4cf73da Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IndexFile           = "index.json"
	QueryParamStatsFile = "queryParamStats.json"
)

Variables

This section is empty.

Functions

func LoadFile

func LoadFile(filename string, object any) error

func QueryHTML

func QueryHTML(url string) *goquery.Document

QueryHTML this method can panic.

Types

type DateTime

type DateTime struct {
	Time time.Time
}

func (DateTime) MarshalJSON

func (s DateTime) MarshalJSON() ([]byte, error)

func (*DateTime) UnmarshalJSON

func (s *DateTime) UnmarshalJSON(bytes []byte) error

type MetadataFileManager

type MetadataFileManager struct {
	staticschema.FileManager
	// contains filtered or unexported fields
}

func NewMetadataFileManager

func NewMetadataFileManager(schemas []byte, locator fileconv.FileLocator) *MetadataFileManager

func (MetadataFileManager) LoadIndex

func (m MetadataFileManager) LoadIndex() (*ModelURLRegistry, error)

func (MetadataFileManager) SaveIndex

func (m MetadataFileManager) SaveIndex(index *ModelURLRegistry) error

func (MetadataFileManager) SaveQueryParamStats

func (m MetadataFileManager) SaveQueryParamStats(stats *QueryParamStats) error
type ModelDocLink struct {
	Name        string `json:"name"`
	DisplayName string `json:"displayName"`
	URL         string `json:"url"`
}
type ModelDocLinks []ModelDocLink

func (ModelDocLinks) FindByName

func (l ModelDocLinks) FindByName(name string) (ModelDocLink, bool)

type ModelURLRegistry

type ModelURLRegistry struct {
	ModelDocs ModelDocLinks `json:"data"`
}

func NewModelURLRegistry

func NewModelURLRegistry() *ModelURLRegistry

func (*ModelURLRegistry) Add

func (r *ModelURLRegistry) Add(displayName, url string)

func (*ModelURLRegistry) Sort

func (r *ModelURLRegistry) Sort()

type QueryParamStats

type QueryParamStats struct {
	Meta queryParamStatsMeta     `json:"meta"`
	Data []queryParamObjectStats `json:"queryParams"`
}

func CalculateQueryParamStats

func CalculateQueryParamStats(queryParamRegistry datautils.NamedLists[string]) *QueryParamStats

CalculateQueryParamStats produces statistics on objects and their query parameters. queryParamRegistry - holds query parameter name to the list of object names that use it.

func NewQueryParamStats

func NewQueryParamStats(totalObjects int) *QueryParamStats

func (*QueryParamStats) SaveParameterStats

func (s *QueryParamStats) SaveParameterStats(queryParamName string, objectNames []string)

Jump to

Keyboard shortcuts

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