api

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

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

Go to latest
Published: Feb 3, 2024 License: Apache-2.0, MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterGateway

func RegisterGateway(server *otohttp.Server, gateway Gateway)

Types

type Event

type Event struct {
	ProjectIDs []string `json:"projectIDs"`
	Type       string   `json:"type"`
	Payload    string   `json:"payload"`
}

type Gateway

type Gateway interface {
	PushEvent(context.Context, Event) (*Void, error)
}

func NewGatewayClient

func NewGatewayClient(
	endpoint string,
	options ...*GatewayClientOptions,
) Gateway

func NewGatewayClientFromOptions

func NewGatewayClientFromOptions(opts base.ServiceOptions) Gateway

type GatewayClientOptions

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

func NewGatewayClientOptions

func NewGatewayClientOptions() *GatewayClientOptions

func (*GatewayClientOptions) SetBasicAuth

func (o *GatewayClientOptions) SetBasicAuth(username, password string) *GatewayClientOptions

func (*GatewayClientOptions) SetTimeout

func (o *GatewayClientOptions) SetTimeout(timeout time.Duration) *GatewayClientOptions

func (*GatewayClientOptions) SetTransport

func (o *GatewayClientOptions) SetTransport(transport http.RoundTripper) *GatewayClientOptions

type Void

type Void struct {
	Error string `json:"error,omitempty"`
}

Jump to

Keyboard shortcuts

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