zop

package
v0.0.0-...-4544830 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Digest

func Digest(str string) string

Digest generates the digest for the given string by MD5 hash and base64 encoding.

Types

type Client

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

Client defines the client for ZOP express APIs.

func NewClient

func NewClient(companyID, key string, opt ...Options) (*Client, error)

NewClient instantiates a new client.

func (*Client) Execute

func (c *Client) Execute(ctx context.Context, req *Request) (string, error)

Execute executes the given request.

type Options

type Options func(*options)

Options sets the options for the `Client`.

func WithHttpClient

func WithHttpClient(client *http.Client) Options

WithHttpClient sets the http client.

type Request

type Request struct {
	URL    string
	Params map[string]string
}

Request defines the request for ZOP express APIs.

Jump to

Keyboard shortcuts

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