utils

package
v0.0.0-...-91b2197 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2017 License: Apache-2.0 Imports: 5 Imported by: 2 modules, 2 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	// ISO8601 is our date format of choice
	ISO8601 = "2006-01-02T15:04:05.999Z07:00"
)

Variables

This section is empty.

Functions

func HostAndIpToBits

func HostAndIpToBits(address string) (bool, string, string, int)

HostAndIpToBits parses an address parsing out the host and port Example input - http://abc.com:1234 returns { true, http, abc.com, 1234 }

Types

type ISO8601Time

type ISO8601Time struct {
	time.Time
}

ISO8601Time ensures a time.Time is serialised to the ISO8601 format

func (*ISO8601Time) AsTime

func (t *ISO8601Time) AsTime() time.Time

func (ISO8601Time) MarshalJSON

func (t ISO8601Time) MarshalJSON() ([]byte, error)

func (ISO8601Time) String

func (t ISO8601Time) String() string

func (*ISO8601Time) UnmarshalJSON

func (t *ISO8601Time) UnmarshalJSON(data []byte) (err error)

type Subject

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

func BuildSubjectKey

func BuildSubjectKey(sensor string, key ...string) Subject

func ParseSubject

func ParseSubject(subject string) (Subject, error)

func (Subject) IsRoot

func (s Subject) IsRoot() bool

func (Subject) Perms

func (s Subject) Perms() []string

func (Subject) String

func (s Subject) String() string

Jump to

Keyboard shortcuts

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