siteacc

package
v0.0.0-...-1fee0d9 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateURL

func GenerateURL(host string, path string, params URLParams) (*url.URL, error)

GenerateURL creates a URL object from a host, path and optional parameters.

func QuerySiteTestUserCredentials

func QuerySiteTestUserCredentials(site string) (*data.Site, error)

func ReadEndpoint

func ReadEndpoint(endpointURL *url.URL, auth *BasicAuth, checkStatus bool) ([]byte, error)

ReadEndpoint reads data from an HTTP endpoint via GET.

func SetSiteAccountsServiceConfig

func SetSiteAccountsServiceConfig(siteacc *config.SiteAccountsService)

func WriteEndpoint

func WriteEndpoint(endpointURL *url.URL, auth *BasicAuth, checkStatus bool) ([]byte, error)

WriteEndpoint sends data to an HTTP endpoint via POST.

Types

type BasicAuth

type BasicAuth struct {
	User     string
	Password string
}

BasicAuth holds user credentials for basic HTTP authentication.

type ResponseParams

type ResponseParams map[string]interface{}

ResponseParams holds parameters of an HTTP response.

type URLParams

type URLParams map[string]string

URLParams holds Key-Value URL parameters; it is a simpler form of url.Values.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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