transom

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2021 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComputeChecksum

func ComputeChecksum(b []byte) string

ComputeChecksum computes a SHA-256 checksum of the given byte slice.

Types

type LoginRequest

type LoginRequest struct {
	Username   string `json:"username"`
	Password   string `json:"password"`
	ClientCode string `json:"clientCode"`
}

type LoginResponse

type LoginResponse struct {
	Error string `json:"error"`
	Token string `json:"token"`
}

type PublishRequest

type PublishRequest struct {
	Org      string `json:"org"`
	App      string `json:"app"`
	Version  string `json:"version"`
	Contents []byte `json:"asset"`
}

type PublishResponse

type PublishResponse struct {
	Version Version `json:"version"`
}

type Transom

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

func NewTransom

func NewTransom(cfg *config.TransomConfig, name string) (*Transom, error)

func (Transom) Publish

func (t Transom) Publish(ctx context.Context, in *PublishRequest) (*PublishResponse, error)

func (*Transom) SetToken

func (t *Transom) SetToken(token string)

type Version

type Version struct {
	Org      string `json:"org"`
	App      string `json:"app"`
	Version  string `json:"version"`
	Checksum string `json:"checksum"`
}

Jump to

Keyboard shortcuts

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