hasher

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2017 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HashListOfStrings

func HashListOfStrings(hashes []string) string

HashListOfStrings generates sha1 hash from a list of strings.

func HashRomanaTenant

func HashRomanaTenant(tenant common.Tenant) string

HashRomanaTenant generates sha1 hash from a canonical form of the tenant.

func HashRomanaTenants

func HashRomanaTenants(tenants []common.Tenant) string

HashRomanaTenants generates unique hash for a list of romana tenants.

Types

type Segment

type Segment common.Segment

Segment wraps tenant.Segment to provide new behavior.

func (Segment) String

func (s Segment) String() string

String generates canonical representation of a Segment.

type Segments

type Segments []Segment

Segments aliases []Segment to provide methods for sort.Interface.

func (Segments) From

func (s Segments) From(originalSegments []common.Segment) (segments Segments)

From initializes Segments from a []tenant.Segment.

func (Segments) Len

func (p Segments) Len() int

Len implements sort.Interface.

func (Segments) Less

func (p Segments) Less(i, j int) bool

Less implements sort.Interface, compares canonical string representations of a Segment.

func (Segments) Sort

func (p Segments) Sort() Segments

Sort is a convinience method that sorts and allows chaining.

func (Segments) Swap

func (p Segments) Swap(i, j int)

Swap implements sort.Interface.

type Tenant

type Tenant common.Tenant

Tenant wraps tenant.Tenant to provide new behavior.

func (Tenant) String

func (t Tenant) String() string

String generates canonical representation of a Tenant.

Jump to

Keyboard shortcuts

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