plugin

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package plugin declares some interfaces that allow developer customizing elevengo agent.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HttpClient added in v0.2.1

type HttpClient interface {

	// Do sends HTTP request and returns HTTP responses.
	Do(req *http.Request) (resp *http.Response, err error)
}

HttpClient declares the interface which an HTTP client should implement, a well-known implementation is `http.Client`, also developer can implement it by himself.

type HttpClientWithJar added in v0.2.1

type HttpClientWithJar interface {
	HttpClient

	// Jar returns client managed cookie jar.
	Jar() http.CookieJar
}

HttpClientWithJar declares interface for developer, who uses self-implemented HttpClient instead of `http.Client`, and manages cookie himself.

type Logger

type Logger interface {

	// Println prints message.
	// The message does not end with newline character("\n"), implementation should append one.
	Println(v ...interface{})
}

Logger interface for printing debug message.

Caller can implement himself, or simply uses log.Logger in stdlib.

Jump to

Keyboard shortcuts

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