redis

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2018 License: AGPL-3.0 Imports: 12 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct {
	*redis.Service
}

Service implements token and entity.

func NewService

func NewService(s *redis.Service) *Service

NewService returns a new game_01 redis Service.

func (*Service) AddEntityToSector

func (s *Service) AddEntityToSector(entityID ulid.ID, sectorID ulid.ID) error

AddEntityToSector implemented with redis.

func (*Service) DelCore

func (s *Service) DelCore(subset infra.CoreSubset) error

DelCore redis implementation.

func (*Service) DelEntity

func (s *Service) DelEntity(subset entity.Subset) error

DelEntity deletes entity in redis.

func (*Service) DelListener

func (s *Service) DelListener(subset event.ListenerSubset) error

DelListener deletes listener in redis.

func (*Service) DelPermission

func (s *Service) DelPermission(subset entity.PermissionSubset) error

DelPermission implemented with redis.

func (*Service) DelRecurrer

func (s *Service) DelRecurrer(subset event.RecurrerSubset) error

DelRecurrer deletes recurrer in redis.

func (*Service) DelStarter

func (s *Service) DelStarter(subset sector.StarterSubset) error

DelStarter redis implementation.

func (*Service) DelSync

func (s *Service) DelSync(subset infra.SyncSubset) error

DelSync redis implementation.

func (*Service) DelToken

func (s *Service) DelToken(subset account.TokenSubset) error

DelToken redis implementation.

func (*Service) GetAbility

func (s *Service) GetAbility(subset ability.Subset) (ability.A, error)

GetAbility implemented with redis.

func (*Service) GetAbilityFeedback

func (s *Service) GetAbilityFeedback(subset ability.FeedbackSubset) (ability.Feedback, error)

GetAbilityFeedback implemented with redis.

func (*Service) GetAbilityTemplate

func (s *Service) GetAbilityTemplate(subset ability.TemplateSubset) (ability.Template, error)

GetAbilityTemplate implemented with redis.

func (*Service) GetAccount

func (s *Service) GetAccount(subset account.Subset) (account.A, error)

GetAccount implemented with redis.

func (*Service) GetEntities

func (s *Service) GetEntities(subset sector.EntitiesSubset) (sector.Entities, error)

GetEntities implemented with redis.

func (*Service) GetEntity

func (s *Service) GetEntity(subset entity.Subset) (entity.E, error)

GetEntity retrieves entity in Redis using ZRangeWithScores.

func (*Service) GetEntityTemplate

func (s *Service) GetEntityTemplate(subset entity.TemplateSubset) (entity.Template, error)

GetEntityTemplate implemented with redis.

func (*Service) GetListener

func (s *Service) GetListener(subset event.ListenerSubset) (event.Listener, error)

GetListener redis implementation.

func (*Service) GetPC

func (s *Service) GetPC(subset entity.PCSubset) (entity.PC, error)

GetPC implemented with redis.

func (*Service) GetPCLeft

func (s *Service) GetPCLeft(subset entity.PCLeftSubset) (entity.PCLeft, error)

GetPCLeft implemented with redis.

func (*Service) GetPermission

func (s *Service) GetPermission(subset entity.PermissionSubset) (entity.Permission, error)

GetPermission implemented with redis.

func (*Service) GetRandomCore

func (s *Service) GetRandomCore(subset infra.CoreSubset) (infra.Core, error)

GetRandomCore redis implementation.

func (*Service) GetRandomStarter

func (s *Service) GetRandomStarter(subset sector.StarterSubset) (sector.Starter, error)

GetRandomStarter redis implementation.

func (*Service) GetRandomSync

func (s *Service) GetRandomSync(subset infra.SyncSubset) (infra.Sync, error)

GetRandomSync redis implementation.

func (*Service) GetRecurrer

func (s *Service) GetRecurrer(subset event.RecurrerSubset) (event.Recurrer, error)

GetRecurrer redis implementation.

func (*Service) GetSector

func (s *Service) GetSector(subset sector.Subset) (sector.S, error)

GetSector implemented with redis.

func (*Service) GetToken

func (s *Service) GetToken(subset account.TokenSubset) (account.Token, error)

GetToken redis implementation.

func (*Service) ListAbility

func (s *Service) ListAbility(subset ability.Subset) ([]ability.A, error)

ListAbility implemented with redis.

func (*Service) ListAbilityTemplate

func (s *Service) ListAbilityTemplate() ([]ability.Template, error)

ListAbilityTemplate implemented with redis.

func (*Service) ListEntityTemplate

func (s *Service) ListEntityTemplate() ([]entity.Template, error)

ListEntityTemplate implemented with redis.

func (*Service) ListEvent

func (s *Service) ListEvent(subset event.Subset) ([]event.E, error)

ListEvent retrieves event in Redis using ZRangeWithScores.

func (*Service) ListPC

func (s *Service) ListPC(subset entity.PCSubset) ([]entity.PC, error)

ListPC implemented with redis.

func (*Service) ListPermission

func (s *Service) ListPermission(subset entity.PermissionSubset) ([]entity.Permission, error)

ListPermission list all entity permissions of a source.

func (*Service) ListTokenHC

func (s *Service) ListTokenHC(subset account.TokenHCSubset) ([]ulid.ID, error)

ListTokenHC redis implementation.

func (*Service) PublishEvent

func (s *Service) PublishEvent(e event.E, id ulid.ID) error

PublishEvent implementation with redis pubsub.

func (*Service) PublishListener

func (s *Service) PublishListener(l event.Listener, id ulid.ID) error

PublishListener implementation with redis pubsub.

func (*Service) PublishRecurrer

func (s *Service) PublishRecurrer(r event.Recurrer, id ulid.ID) error

PublishRecurrer implementation with redis pubsub.

func (*Service) RemoveEntityToSector

func (s *Service) RemoveEntityToSector(entityID ulid.ID, sectorID ulid.ID) error

RemoveEntityToSector implemented with redis.

func (*Service) SetAbility

func (s *Service) SetAbility(a ability.A, entity ulid.ID) error

SetAbility implemented with redis.

func (*Service) SetAbilityFeedback

func (s *Service) SetAbilityFeedback(afb ability.Feedback) error

SetAbilityFeedback implemented with redis.

func (*Service) SetAbilityTemplate

func (s *Service) SetAbilityTemplate(template ability.Template) error

SetAbilityTemplate implemented with redis.

func (*Service) SetAccount

func (s *Service) SetAccount(a account.A) error

SetAccount implemented with redis.

func (*Service) SetCore

func (s *Service) SetCore(core infra.Core) error

SetCore redis implementation.

func (*Service) SetEntity

func (s *Service) SetEntity(e entity.E, ts int64) error

SetEntity implemented with redis.

func (*Service) SetEntityTemplate

func (s *Service) SetEntityTemplate(template entity.Template) error

SetEntityTemplate implemented with redis.

func (*Service) SetEvent

func (s *Service) SetEvent(e event.E, id ulid.ID) error

SetEvent implemented with redis.

func (*Service) SetListener

func (s *Service) SetListener(listener event.Listener) error

SetListener redis implementation.

func (*Service) SetPC

func (s *Service) SetPC(pc entity.PC, account ulid.ID) error

SetPC implemented with redis.

func (*Service) SetPCLeft

func (s *Service) SetPCLeft(pc entity.PCLeft, account ulid.ID) error

SetPCLeft implemented with redis.

func (*Service) SetPermission

func (s *Service) SetPermission(permission entity.Permission) error

SetPermission implemented with redis.

func (*Service) SetRecurrer

func (s *Service) SetRecurrer(recurrer event.Recurrer) error

SetRecurrer redis implementation.

func (*Service) SetSector

func (s *Service) SetSector(sec sector.S) error

SetSector implemented with redis.

func (*Service) SetStarter

func (s *Service) SetStarter(starter sector.Starter) error

SetStarter redis implementation.

func (*Service) SetSync

func (s *Service) SetSync(sync infra.Sync) error

SetSync redis implementation.

func (*Service) SetToken

func (s *Service) SetToken(token account.Token) error

SetToken redis implementation.

func (*Service) SetTokenHC

func (s *Service) SetTokenHC(id ulid.ID, hc int64) error

SetTokenHC redis implementation.

func (*Service) SubscribeEvent

func (s *Service) SubscribeEvent(id ulid.ID) *event.Subscription

SubscribeEvent implementation with redis pubsub.

func (*Service) SubscribeListener

func (s *Service) SubscribeListener(id ulid.ID) *event.Subscription

SubscribeListener implementation with redis pubsub.

func (*Service) SubscribeRecurrer

func (s *Service) SubscribeRecurrer(id ulid.ID) *event.Subscription

SubscribeRecurrer implementation with redis pubsub.

Jump to

Keyboard shortcuts

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