store

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2023 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CloudSQLConnector added in v0.0.4

type CloudSQLConnector struct {
	Instance string
	Database string
	// TODO: Determine user from the app default service credentials
	Username string
}

type CreateActorOpts added in v0.0.4

type CreateActorOpts struct {
	DID     string
	Comment string
	Status  v1.ActorStatus
}

type CreateAuditEventOpts added in v0.0.11

type CreateAuditEventOpts struct {
	ActorDID         string
	SubjectDID       string
	SubjectRecordURI string
	Payload          proto.Message
}

type CreateFollowOpts added in v0.0.4

type CreateFollowOpts struct {
	URI        string
	ActorDID   string
	SubjectDID string
	CreatedAt  time.Time
	IndexedAt  time.Time
}

type CreateLikeOpts added in v0.0.4

type CreateLikeOpts struct {
	URI        string
	ActorDID   string
	SubjectURI string
	CreatedAt  time.Time
	IndexedAt  time.Time
}

type CreatePostOpts added in v0.0.4

type CreatePostOpts struct {
	URI       string
	ActorDID  string
	CreatedAt time.Time
	IndexedAt time.Time
	Tags      []string
}

type DeleteFollowOpts added in v0.0.4

type DeleteFollowOpts struct {
	URI string
}

type DeleteLikeOpts added in v0.0.4

type DeleteLikeOpts struct {
	URI string
}

type DeletePostOpts added in v0.0.4

type DeletePostOpts struct {
	URI string
}

type DirectConnector added in v0.0.4

type DirectConnector struct {
	URI string
}

type ListActorsOpts added in v0.0.4

type ListActorsOpts struct {
	FilterStatus v1.ActorStatus
}

type ListAuditEventsOpts added in v0.0.11

type ListAuditEventsOpts struct {
	FilterSubjectDID string
}

type ListPostsForNewFeedOpts added in v0.0.4

type ListPostsForNewFeedOpts struct {
	CursorTime  time.Time
	RequireTags []string
	ExcludeTags []string
	Limit       int
}

type ListPostsWithLikesOpts added in v0.0.4

type ListPostsWithLikesOpts struct {
	CursorTime time.Time
	Limit      int
}

type PGXStore added in v0.0.4

type PGXStore struct {
	// contains filtered or unexported fields
}

func ConnectPGXStore added in v0.0.4

func ConnectPGXStore(ctx context.Context, log *zap.Logger, connector PoolConnector) (*PGXStore, error)

func (*PGXStore) Close added in v0.0.4

func (s *PGXStore) Close()

func (*PGXStore) CreateActor added in v0.0.4

func (s *PGXStore) CreateActor(ctx context.Context, opts CreateActorOpts) (out *v1.Actor, err error)

func (*PGXStore) CreateAuditEvent added in v0.0.11

func (s *PGXStore) CreateAuditEvent(ctx context.Context, opts CreateAuditEventOpts) (out *v1.AuditEvent, err error)

func (*PGXStore) CreateFollow added in v0.0.4

func (s *PGXStore) CreateFollow(ctx context.Context, opts CreateFollowOpts) (err error)

func (*PGXStore) CreateLike added in v0.0.4

func (s *PGXStore) CreateLike(ctx context.Context, opts CreateLikeOpts) (err error)

func (*PGXStore) CreatePost added in v0.0.4

func (s *PGXStore) CreatePost(ctx context.Context, opts CreatePostOpts) (err error)

func (*PGXStore) DeleteFollow added in v0.0.4

func (s *PGXStore) DeleteFollow(ctx context.Context, opts DeleteFollowOpts) (err error)

func (*PGXStore) DeleteLike added in v0.0.4

func (s *PGXStore) DeleteLike(ctx context.Context, opts DeleteLikeOpts) (err error)

func (*PGXStore) DeletePost added in v0.0.4

func (s *PGXStore) DeletePost(ctx context.Context, opts DeletePostOpts) (err error)

func (*PGXStore) GetActorByDID added in v0.0.9

func (s *PGXStore) GetActorByDID(ctx context.Context, did string) (out *v1.Actor, err error)

func (*PGXStore) ListActors added in v0.0.4

func (s *PGXStore) ListActors(ctx context.Context, opts ListActorsOpts) (out []*v1.Actor, err error)

func (*PGXStore) ListAuditEvents added in v0.0.11

func (s *PGXStore) ListAuditEvents(ctx context.Context, opts ListAuditEventsOpts) (out []*v1.AuditEvent, err error)

func (*PGXStore) ListPostsForNewFeed added in v0.0.4

func (s *PGXStore) ListPostsForNewFeed(ctx context.Context, opts ListPostsForNewFeedOpts) (out []gen.CandidatePost, err error)

func (*PGXStore) ListPostsWithLikes added in v0.0.4

func (s *PGXStore) ListPostsWithLikes(ctx context.Context, opts ListPostsWithLikesOpts) (out []gen.GetPostsWithLikesRow, err error)

func (*PGXStore) UpdateActor added in v0.0.4

func (s *PGXStore) UpdateActor(ctx context.Context, opts UpdateActorOpts) (out *v1.Actor, err error)

type PoolConnector added in v0.0.4

type PoolConnector interface {
	// contains filtered or unexported methods
}

type UpdateActorOpts added in v0.0.4

type UpdateActorOpts struct {
	// DID is the DID of the actor to update.
	DID string
	// Predicate is a function which is called on the fetched actor before
	// updating it. This allows rules to be placed that prevent invalid state
	// transitions.
	Predicate func(actor *v1.Actor) error
	// TODO: These fields should be optional
	UpdateStatus   v1.ActorStatus
	UpdateIsArtist bool
	UpdateComment  string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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