plc

package
v0.0.0-...-0f07f94 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2023 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Directory

type Directory struct {
	Endpoint       string
	PLCRateLimiter *rate.Limiter
	PDSRateLimiter *rate.Limiter
	CheckPeriod    time.Duration
	AfterCursor    time.Time
	Logger         *zap.SugaredLogger

	ValidationTTL time.Duration

	RedisClient *redis.Client
	RedisPrefix string

	Store *store.Store
}

func NewDirectory

func NewDirectory(endpoint string, redisClient *redis.Client, store *store.Store, redisPrefix string) (*Directory, error)

func (*Directory) Start

func (d *Directory) Start()

func (*Directory) ValidateHandle

func (d *Directory) ValidateHandle(ctx context.Context, client *http.Client, did string, handle string) (bool, []error)

func (*Directory) ValidateHandlePage

func (d *Directory) ValidateHandlePage(ctx context.Context, pageSize int) bool

func (*Directory) ValidateHandles

func (d *Directory) ValidateHandles(ctx context.Context, pageSize int, timeBetweenLoops time.Duration)

type DirectoryEntry

type DirectoryEntry struct {
	Did string `json:"did"`
	AKA string `json:"handle"`
}

type DirectoryJSONLRow

type DirectoryJSONLRow struct {
	Did       string    `json:"did"`
	Operation Operation `json:"operation"`
	Cid       string    `json:"cid"`
	Nullified bool      `json:"nullified"`
	CreatedAt time.Time `json:"createdAt"`
}

type Operation

type Operation struct {
	AlsoKnownAs []string `json:"alsoKnownAs"`
	Type        string   `json:"type"`
}

type RawDirectoryEntry

type RawDirectoryEntry struct {
	JSON json.RawMessage
}

Jump to

Keyboard shortcuts

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