Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrNoSuchBucket = errors.NewError("no such bucket")
Functions ¶
This section is empty.
Types ¶
type CrawlOptions ¶
type Crawler ¶
type Crawler struct {
// contains filtered or unexported fields
}
Crawler is a high-level representation of the Gab client and controls access to resources, managing some state. In particular, responses returned by the client will be written by the Crawler to permanent storage or elsewhere (depending on configuration).
func NewCrawler ¶
func NewCrawler(configuration *api.Configuration) (*Crawler, error)
NewCrawler configures and returns a Crawler instance.
func (*Crawler) Groups ¶
func (c *Crawler) Groups(options *CrawlOptions) error
Groups instructs the crawler to crawl groups in a manner consistent with the current configuration.
type CrawlerState ¶
type CrawlerState struct { Token string `yaml:"token"` LastCrawl string `yaml:"last_crawl"` LastID int `yaml:"last_id"` // contains filtered or unexported fields }
func CrawlerStateFromPath ¶
func CrawlerStateFromPath(path string) (*CrawlerState, error)
func (*CrawlerState) Save ¶
func (c *CrawlerState) Save() error
type CredentialsFile ¶
type CredentialsFile struct { AuthorizationToken string `yaml:"authorization_token"` EmailAddress string `yaml:"email_address"` Password string `yaml:"password"` }
CredentialsFile defines the layout of the YAML configuration in which the user's authentication is expected to be found. If this file is empty or doesn't exist, the user will be prompted for their credentials.
The credentials file isn't necessary but may be useful for automating the client via a token.
func CredentialsFileFromPath ¶
func CredentialsFileFromPath(path string) *CredentialsFile
CredentialsFileFromPath returns a CredentialsFile as returned from the specified path, or an empty CredentialsFile struct if it does not exist.
type GroupCSVWriter ¶
type GroupCSVWriter struct { File io.WriteCloser CSV *csv.Writer // contains filtered or unexported fields }
func (*GroupCSVWriter) Close ¶
func (g *GroupCSVWriter) Close() error
Close the CSV output and file interface.
Does not wrap errors.
type GroupJSONWriter ¶
type GroupJSONWriter struct { File io.WriteCloser // contains filtered or unexported fields }
func (*GroupJSONWriter) Close ¶
func (g *GroupJSONWriter) Close() error
Close the JSON output and file interface.
Does not wrap errors.
type GroupWriter ¶
func NewGroupWriter ¶
func NewGroupWriter(output io.WriteCloser, format string) (GroupWriter, error)
NewGroupWriter creates a new serializer for group data based on the specified format. If an invalid format is requested, ErrInvalidFormatRequested will be returned as the error.