webhook

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RequestAuthorization string

Functions

This section is empty.

Types

type BasicAcquirer

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

func NewBasicAcquirer

func NewBasicAcquirer(credentials string) *BasicAcquirer

func (*BasicAcquirer) Acquire

func (b *BasicAcquirer) Acquire() (string, error)

type DefaultAcquirer

type DefaultAcquirer struct{}

func (*DefaultAcquirer) Acquire

func (d *DefaultAcquirer) Acquire() (string, error)

type SatAcquirer

type SatAcquirer struct {
	Client  string        `json:"client"`
	Secret  string        `json:"secret"`
	SatURL  string        `json:"satURL"`
	Timeout time.Duration `json:"timeout"`
}

func (*SatAcquirer) Acquire

func (s *SatAcquirer) Acquire() (string, error)

type SatToken

type SatToken struct {
	Expiration float64 `json:"expires_in"`
	Token      string  `json:"serviceAccessToken"`
}

type TokenAcquirer

type TokenAcquirer interface {
	Acquire() (string, error)
}

type Webhook

type Webhook struct {
	URL             string   `json:",url"`
	RegistrationURL string   `json:",registrationURL"`
	EventsToWatch   []string `json:",eventsToWatch"`

	Acquirer TokenAcquirer
}

func (*Webhook) Register

func (webhook *Webhook) Register(client *http.Client, secret string) error

Jump to

Keyboard shortcuts

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