zink

package module
v0.0.0-...-d6f245e Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

README ΒΆ

πŸ—ƒοΈ Archive Notice

No longer under development until further notice


πŸ”— zink

Go Reference Go Report Card

Go library and command line tool for https://z.umn.edu, a URL shortening service for people in the University of Minnesota.

Documentation ΒΆ

Overview ΒΆ

Package zink implements the functions to access z.umn.edu.

Index ΒΆ

Constants ΒΆ

View Source
const DefaultAccessPoint = "https://z.umn.edu/api/v1/urls"

Variables ΒΆ

This section is empty.

Functions ΒΆ

This section is empty.

Types ΒΆ

type Handle ΒΆ

type Handle struct {
	AccessID    string
	SecretKey   string
	AccessPoint string
}

Handle holds the access ID and secret key.

func New ΒΆ

func New(id string, secret string) *Handle

New creates a new Handle.

func (*Handle) Do ΒΆ

func (h *Handle) Do(ctx context.Context, reqs ...Request) ([]Response, error)

Do sends the requets to the access point.

type Request ΒΆ

type Request struct {
	URL        string  `json:"url"`
	Keyword    *string `json:"keyword,omitempty"`
	Collection *string `json:"collection,omitempty"`
}

type Response ΒΆ

type Response struct {
	Request
	Result Result
}

type Result ΒΆ

type Result interface{}

type ResultError ΒΆ

type ResultError []string

type ResultSuccess ΒΆ

type ResultSuccess string

Jump to

Keyboard shortcuts

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