ics

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrCouldntEncode is returned when problem occur while trying to encode an
	// event.
	ErrCouldntEncode = errors.New("couldn't encode an event")
	// ErrCouldntDecode is returned when problem occur while trying to decode an
	// event.
	ErrCouldntDecode = errors.New("couldn't decode an event")
	// ErrCantConfigureICS is returned when problem occur while trying to
	// configure ICS sender.
	ErrCantConfigureICS = errors.New("can't configure ICS sender")
)
View Source
var ContainerBasename = "quay.io/cardil" //nolint:gochecknoglobals

ContainerBasename holds a OCI container base name. TODO: set value from .env file during the build.

Functions

func Decode

func Decode(encoded string) (*cloudevents.Event, error)

Decode will decode an event from ICS encoding.

func Encode

func Encode(ce cloudevents.Event) (string, error)

Encode will encode a cloud event to ICS encoding form: Base64(zlib(minimal JSON)).

Types

type App

type App struct {
	event.Binding
}

App holds an ICS app binding.

func (*App) SendFromEnv

func (app *App) SendFromEnv() error

SendFromEnv will send an event based on a values stored in environmental variables.

type Args

type Args struct {
	Sink        string
	CeOverrides string
	Event       string
}

Args holds a list of args for in-cluster-sender.

Jump to

Keyboard shortcuts

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