common

package
v0.8.0-dev.2.0...-ba402f6 Latest Latest
Warning

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

Go to latest
Published: May 29, 2018 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CallerName

func CallerName(level int) string

CallerName returns the name of the function at the specified level level == 0 means current method name

Types

type SetMatrix

type SetMatrix interface {
	// Get returns the members of the set for a specific key as a slice.
	Get(key string) ([]interface{}, bool)
	// Contains is used to verify if an element is in a set for a specific key
	// returns true if the element is in the set
	// returns true if there is a set for the key
	Contains(key string, value interface{}) (bool, bool)
	// Insert inserts the value in the set of a key
	// returns true if the value is inserted (was not already in the set), false otherwise
	// returns also the length of the set for the key
	Insert(key string, value interface{}) (bool, int)
	// Remove removes the value in the set for a specific key
	// returns true if the value is deleted, false otherwise
	// returns also the length of the set for the key
	Remove(key string, value interface{}) (bool, int)
	// Cardinality returns the number of elements in the set for a key
	// returns false if the set is not present
	Cardinality(key string) (int, bool)
	// String returns the string version of the set, empty otherwise
	// returns false if the set is not present
	String(key string) (string, bool)
	// Returns all the keys in the map
	Keys() []string
}

SetMatrix is a map of Sets

func NewSetMatrix

func NewSetMatrix() SetMatrix

NewSetMatrix creates a new set matrix object

Jump to

Keyboard shortcuts

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