service

package
v0.0.0-...-045640b Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KV

type KV struct {
	Key   string
	Value string
}

KV defines a metadata entry.

type Option

type Option func(spec *Spec)

Option defines an optional component of the spec.

func Description

func Description(description string) Option

Description specifies a short, brief description about the service.

func LinkGroup

func LinkGroup(label string, options ...linkgroup.Option) Option

LinkGroup appends a group of links to the provided service.

func LogoURL

func LogoURL(url string) Option

LogoURL configures the icon for the service.

func Metadata

func Metadata(kvs ...string) Option

Metadata allows additional metadata to be attached to a service.

func URL

func URL(url string) Option

URL configures the services public facing URL that's presented to end users.

type Spec

type Spec struct {
	Label       string
	LogoURL     string
	Description string
	URL         string
	Metadata    []KV
	LinkGroups  []linkgroup.Spec
}

Spec defines the elements needed to render a service.

func New

func New(label string, options ...Option) Spec

New constructs a spec given a label and set of options.

Jump to

Keyboard shortcuts

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