platform

package
v0.0.0-...-de7ae53 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AbstractClient

type AbstractClient interface {
	// Get http method
	Get(url string, headers map[string]string) (*http.Response, error)

	// Post http method
	Post(url string, body []byte, headers map[string]string) (*http.Response, error)

	// PreHeaders process request headers
	PreHeaders(params ...any) map[string]string
}

AbstractClient all platform client abstract client

type AbstractCrawler

type AbstractCrawler interface {

	// InitConfig  methods receive some parameters and assigning values to the properties of a structure.
	InitConfig(loginType string)

	// Start method is the main process implemented in the specific platform.
	Start()

	// Search method will use some keywords to find for content on corresponding platforms.
	Search()
}

AbstractCrawler all media platforms abstract interface, the specific platform needs to implement it

type AbstractLogin

type AbstractLogin interface {

	// Begin method is the main process implemented on the logging in
	Begin()

	// LoginByQrcode use qrcode logging in the specific platform
	LoginByQrcode()

	// LoginByCookies use cookies logging in the specific platform
	LoginByCookies()

	// CheckLoginState Asynchronous polling check login status.
	CheckLoginState()
}

AbstractLogin extract some login methods into an interface, and specific subclasses can implement the methods.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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