dl

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package dl implements documentation downloading facility.

Index

Constants

View Source
const NoLayer = 0

NoLayer can be passed as "layer" argument.

Variables

View Source
var ErrReadOnly = errors.New("write operation in read only mode")

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(opt Options) (*Client, error)

func (*Client) Get

func (c *Client) Get(ctx context.Context, layer int, key string) ([]byte, error)

Get fetches documentation by key and layer.

Pass "NoLayer" as layer to use default documentation. Examples for "key" value:

  • "schema" for index of documentation
  • "constructor/inputMediaGeoLive" for constructor "inputMediaGeoLive"
  • "type/InputMedia" for class "InputMedia"
  • "method/messages.addChatUser" for "messages.addChatUser" method

Blank key is invalid.

type HTTPClient

type HTTPClient interface {
	Do(req *http.Request) (*http.Response, error)
}

type Options

type Options struct {
	Client   HTTPClient
	Host     string
	Path     string
	Readonly bool
	FromZip  bool
}

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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