package module
Version: v0.0.0-...-93b26d4 Latest Latest

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

Go to latest
Published: Jul 9, 2021 License: MIT Imports: 6 Imported by: 5




This section is empty.


This section is empty.


This section is empty.


type BatchRequest

type BatchRequest struct {
	ID      string            `json:"id"`
	Method  string            `json:"method"`
	URL     string            `json:"url"`
	Headers map[string]string `json:"headers"`

BatchRequest ...

func NewBatchRequest

func NewBatchRequest(id string, method string, urs string, contentHash string, now time.Time, key *keys.EdX25519Key) (*BatchRequest, error)

NewBatchRequest returns batch request.

type BatchRequests

type BatchRequests struct {
	Requests []*BatchRequest `json:"requests"`

BatchRequests ...

type BatchResponse

type BatchResponse struct {
	ID     string      `json:"id"`
	Status int         `json:"status"`
	Body   interface{} `json:"body"`

BatchResponse ..

func (*BatchResponse) As

func (r *BatchResponse) As(v interface{}) error

As unmarshals into value.

func (*BatchResponse) Error

func (r *BatchResponse) Error() *Error

type BatchResponses

type BatchResponses struct {
	Responses []*BatchResponse `json:"responses"`

BatchResponses ...

type Data

type Data struct {
	Data []byte `json:"data" msgpack:"dat"`

Data for request body.

type Error

type Error struct {
	Message string `json:"message,omitempty"`
	Status  int    `json:"status,omitempty"`

Error ...

type Event

type Event struct {
	Data []byte `json:"data" msgpack:"dat" firestore:"data"`

	// Index for event (read only).
	Index int64 `json:"idx" msgpack:"idx" firestore:"idx"`
	// Timestamp (read only). The time at which the event was created.
	// Firestore sets this to the document create time.
	Timestamp int64 `json:"ts" msgpack:"ts" firestore:"-"`

type Events

type Events struct {
	Events    []*Event `json:"events"`
	Index     int64    `json:"idx"`
	Truncated bool     `json:"truncated,omitempty"`

Events ...

type EventsResponse

type EventsResponse struct {
	Events []*Event `json:"events" msgpack:"events"`
	Index  int64    `json:"idx" msgpack:"idx"`

EventsResponse ...

type InviteCodeCreateResponse

type InviteCodeCreateResponse struct {
	Code string `json:"code"`

InviteCodeCreateResponse ...

type InviteCodeResponse

type InviteCodeResponse struct {
	Sender    keys.ID `json:"sender"`
	Recipient keys.ID `json:"recipient"`

InviteCodeResponse ...

type Metadata

type Metadata struct {
	CreatedAt time.Time `json:"createdAt"`
	UpdatedAt time.Time `json:"updatedAt"`

Metadata ...

type Response

type Response struct {
	Error *Error `json:"error,omitempty"`

Response ...

type SigchainResponse

type SigchainResponse struct {
	KID        keys.ID             `json:"kid"`
	Metadata   map[string]Metadata `json:"md,omitempty"`
	Statements []*keys.Statement   `json:"statements"`

SigchainResponse is the response format for a Sigchain request.

func (SigchainResponse) MetadataFor

func (r SigchainResponse) MetadataFor(st *keys.Statement) Metadata

MetadataFor returns metadata for Signed.

func (SigchainResponse) Sigchain

func (r SigchainResponse) Sigchain() (*keys.Sigchain, error)

Sigchain from response.

type User

type User struct {
	ID         string      `json:"id,omitempty"`
	Name       string      `json:"name,omitempty"`
	KID        keys.ID     `json:"kid,omitempty"`
	Seq        int         `json:"seq,omitempty"`
	Service    string      `json:"service,omitempty"`
	URL        string      `json:"url,omitempty"`
	Status     user.Status `json:"status,omitempty"`
	Statement  string      `json:"statement,omitempty"`
	VerifiedAt int64       `json:"verifiedAt,omitempty"`
	Timestamp  int64       `json:"ts,omitempty"`
	MatchField string      `json:"mf,omitempty"`
	Err        string      `json:"err,omitempty"`

User ...

func UserFromResult

func UserFromResult(result *user.Result) *User

UserFromResult returns User from user.Result.

func UserFromSearchResult

func UserFromSearchResult(sr *users.SearchResult) *User

UserFromSearchResult returns User from user.SearchResult.

type UserResponse

type UserResponse struct {
	User *User `json:"user"`

UserResponse ...

type UserSearchResponse

type UserSearchResponse struct {
	Users []*User `json:"users"`

UserSearchResponse ...

Jump to

Keyboard shortcuts

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