service

package
v0.0.0-...-13e599b Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache interface {
	Set(context.Context, string, interface{}, time.Duration) error
	Delete(context.Context, string) error
	Get(context.Context, string, interface{}) error
}

type GraphStore

type GraphStore interface {
	Store

	GetDepth(context.Context, int64, int64) (int, error)

	GetFriendship(context.Context, int64) (internal.Friendship, error)

	GetPerson(context.Context, int64) (*internal.Person, error)

	GetAll(context.Context) ([]internal.Friendship, error)
}

GraphStore is a bi-directional graph ds representing relation-ships between people.

Should be used to interface with persistent store and provide extra functionality over typicall store.

type MessageBroker

type MessageBroker interface {
	CreatedPerson(context.Context, *internal.Person) error
	CreatedFriendship(context.Context, internal.Friendship) error
	DeletedPerson(context.Context, int64) error
}

type Store

type Store interface {
	AddPerson(context.Context, *internal.Person) error

	AddFriendship(context.Context, internal.Friendship) error

	RemovePerson(context.Context, int64) error
}

Store stores people and their many-to-many relations represented by friendships.

Jump to

Keyboard shortcuts

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