Documentation
¶
Index ¶
- Constants
- func NewConcurrentUpdateError(entry Entry, err error) error
- type CarrierLocation
- type CarrierName
- type CommanderLocation
- type ConcurrentUpdateError
- type CurrentStation
- type Deleter
- type Entry
- type EntryKey
- type Getter
- type JumpByDeparture
- type JumpPlan
- type JumpPlans
- type Putter
- type Repository
- type System
Constants ¶
View Source
const EntryCarrierLocation = "CarrierLocation"
View Source
const EntryCarrierName = "CarrierName"
View Source
const EntryCommanderLocation = "CommanderLocation"
View Source
const EntryJumpPlan = "JumpPlan"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CarrierLocation ¶
type CarrierLocation struct {
Name string `json:"Name"`
Callsign string `json:"CallSign"`
CurrentSystem System `json:"CurrentSystem"`
// contains filtered or unexported fields
}
func (*CarrierLocation) IncrementVersion ¶
func (e *CarrierLocation) IncrementVersion()
type CarrierName ¶
type CarrierName struct {
CarrierName string `json:"CarrierName"`
CallSign string `json:"CallSign"`
// contains filtered or unexported fields
}
func (*CarrierName) IncrementVersion ¶
func (e *CarrierName) IncrementVersion()
type CommanderLocation ¶
type CommanderLocation struct {
Name string `json:"Name"`
LastBeacon time.Time `json:"LastBeacon"`
CurrentSystem System `json:"CurrentSystem"`
CurrentStation CurrentStation `json:"CurrentStation"`
// contains filtered or unexported fields
}
func (*CommanderLocation) IncrementVersion ¶
func (e *CommanderLocation) IncrementVersion()
type ConcurrentUpdateError ¶
type ConcurrentUpdateError struct {
// contains filtered or unexported fields
}
func (*ConcurrentUpdateError) Error ¶
func (e *ConcurrentUpdateError) Error() string
func (*ConcurrentUpdateError) Unwrap ¶
func (e *ConcurrentUpdateError) Unwrap() error
type CurrentStation ¶
type Deleter ¶
type Deleter interface {
// Delete will remove the specified entry from the store if it exists. Returns nil if the entry does not exist,
// a ConcurrentUpdateError if the entry exists but is at a different version, or an underlying data store error.
Delete(entry Entry) error
}
Deleter erases entries from the data store
type Entry ¶
type Getter ¶
type Getter interface {
// Get retrieves a single Entry with the given name and data type from the store.
//
// Returns nil, nil if the entry does not exist, or nil and an error if there was an error in the underlying store.
Get(id string, dataType string) (Entry, error)
// All retrieves every entry of a given type from the data store.
//
// Returns nil, nil if there are no entries of the given type, or nil and an error if there was an error in the
// underlying store.
All(dataType string) ([]Entry, error)
}
Getter retrieves entries from the data store
type JumpByDeparture ¶
type JumpByDeparture struct{ JumpPlans }
func (JumpByDeparture) Less ¶
func (s JumpByDeparture) Less(i, j int) bool
type JumpPlan ¶
type JumpPlan struct {
CarrierName string `json:"CarrierName"`
CallSign string `json:"CallSign"`
FromSystem System `json:"FromSystem"`
ToSystem System `json:"ToSystem"`
DepartingAt time.Time `json:"DepartingAt"`
// contains filtered or unexported fields
}
func (*JumpPlan) IncrementVersion ¶
func (e *JumpPlan) IncrementVersion()
type Putter ¶
type Putter interface {
// Writes the given Entry into the data store, returning ConcurrentUpdateError if the entity exists and is at
// a higher version.
Put(entry Entry) error
}
Putter places new entries in the data store.
All methods return a non-nil error if there was a failure to write to the store.
type Repository ¶
Repository wraps the Putter, Getter, and Deleter interfaces into a single interface
Click to show internal directories.
Click to hide internal directories.