web

package
v0.0.0-...-39bbcdd Latest Latest
Warning

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

Go to latest
Published: May 9, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	SetUsername(url string) Client
	GetUsername() *string

	SetPassword(password string) Client
	GetPassword() *string

	SetLog(log Log) Client
	GetLog() Log

	SetAPI(*forgejo_sdk.Client) Client
	GetAPI() *forgejo_sdk.Client

	SetURLString(string) Client
	SetURL(*url.URL) Client
	GetURL() *url.URL

	SetClient(client *http.Client) Client
	GetClient() *http.Client

	NewRequest() Request
	NewResponse() Response

	Impersonate(context.Context, int64) Client

	Do(context.Context, Request) Response

	Connect(context.Context)
}

func NewClient

func NewClient() Client

type Log

type Log interface {
	Debug(string, ...any)
}

type Request

type Request interface {
	SetContext(context.Context) Request
	GetContext() context.Context

	SetPath(string) Request
	GetPath() string

	GetRequest() *http.Request
	GetHeader() *http.Header

	SetPostForm(map[string]string) Request
}

type Response

type Response interface {
	SetResponse(*http.Response) Response
	GetResponse() *http.Response

	GetHeader() *http.Header
	GetReader() io.ReadCloser

	GetDoc() *goquery.Document

	GetBody() []byte
	GetError() error
	GetFlashError() error
}

Jump to

Keyboard shortcuts

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