identity

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package identity contains tools for representing and validating the identity of Dogma entities.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Identity

type Identity struct {
	Name string
	Key  string
}

Identity contains the application-defined identity of an application or its handlers.

func MustNew

func MustNew(n, k string) Identity

MustNew returns a new identity, or panics if the given name or key are invalid.

func New

func New(n, k string) (Identity, error)

New returns a new identity.

func (Identity) IsZero

func (i Identity) IsZero() bool

IsZero returns true if the identity is the zero-value.

func (Identity) String

func (i Identity) String() string

func (Identity) Validate

func (i Identity) Validate() error

Validate returns an error if i is not a valid identity.

Jump to

Keyboard shortcuts

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