model

package
v0.19.3 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package model is a model abstraction of federation in.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FederationInQuery

type FederationInQuery struct {
	QueryID             string
	ServerAddr          string
	Audience            string
	IncludeRegions      []string
	ExcludeRegions      []string
	OnlyLocalProvenance bool
	OnlyTravelers       bool

	// FetchState items.
	LastTimestamp        time.Time
	LastCursor           string
	LastRevisedTimestamp time.Time
	LastRevisedCursor    string
}

FederationInQuery represents a configuration to pull federation results from other servers.

func (*FederationInQuery) FetchState added in v0.11.0

func (q *FederationInQuery) FetchState() *federation.FetchState

FetchState returns the federation fetch state based on query state.

func (*FederationInQuery) UpdateFetchState added in v0.11.0

func (q *FederationInQuery) UpdateFetchState(fs *federation.FetchState)

UpdateFetchState updates the query state based on the fetch state returned from a federation pull.

type FederationInSync

type FederationInSync struct {
	SyncID              int64
	QueryID             string
	Started             time.Time
	Completed           time.Time
	Insertions          int
	MaxTimestamp        time.Time
	MaxRevisedTimestamp time.Time
}

FederationInSync is the result of a federation query pulled from other servers.

type FederationOutAuthorization

type FederationOutAuthorization struct {
	Issuer  string
	Subject string
	// Audience is optional, but will be validated against the OIDC token if provided.
	Audience       string
	Note           string
	IncludeRegions []string
	ExcludeRegions []string
}

FederationOutAuthorization is an authorized client that reads federation data from this server.

Jump to

Keyboard shortcuts

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