common

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: May 13, 2014 License: BSD-2-Clause Imports: 1 Imported by: 0

README

common

Package common provides type KeyScoreMember, which is the atom that represents an element in a Roshi set, and maps directly to an element in a Redis ZSET.

Documentation

Overview

Package common holds data structures shared between different packages.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KeyMember added in v0.0.2

type KeyMember struct {
	Key    string
	Member string
}

KeyMember is used by the Score method, and other places internally. It's probably not useful to external users.

type KeyScoreMember

type KeyScoreMember struct {
	Key    string
	Score  float64
	Member string
}

KeyScoreMember represents one entry in a ZSET.

func (KeyScoreMember) MarshalJSON

func (ksm KeyScoreMember) MarshalJSON() ([]byte, error)

MarshalJSON makes sure that the strings in KeyScoreMember are marshalled properly as byte sequences (i.e. base64 encoded in the JSON data; the JSON string encoding is neither efficient nor reliable for arbitrary byte sequences).

func (*KeyScoreMember) UnmarshalJSON

func (ksm *KeyScoreMember) UnmarshalJSON(data []byte) error

UnmarshalJSON makes sure that the strings in KeyScoreMember are unmarshalled properly from byte sequences (i.e. base64 encoded in the JSON data; the JSON string encoding is neither efficient nor reliable for arbitrary byte sequences).

Jump to

Keyboard shortcuts

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