attribute

package
v0.0.0-...-a75fe09 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2022 License: GPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Tag

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

Tag partly implements Taggable.

func NewTag

func NewTag(configId string, scraperId string) *Tag

func (*Tag) GetConfigId

func (t *Tag) GetConfigId() string

GetConfigId implements Taggable.GetConfigId.

func (*Tag) GetScraperId

func (t *Tag) GetScraperId() string

GetScraperId implements Taggable.GetScraperId.

type Taggable

type Taggable interface {
	// GetConfigId returns the ID of the config.Config instance it was tagged by.
	GetConfigId() string
	// GetScraperId returns the id of the scraper.Scraper it was tagged by.
	GetScraperId() string
	// SetTag sets the Tag which is used to identify its source.
	SetTag(t *Tag)
}

Taggable allows a type to tag itself by storing a config.Config ID and a scraper.Scraper ID, these IDs allow processes to identify the source of the tagged type.

Jump to

Keyboard shortcuts

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