Back to godoc.org
github.com/keys-pub/keys-ext/http/api

Package api

v0.0.0-...-eab4d8f
Latest Go to latest

The latest major version is .

Published: 2 days ago | License: MIT | Module: github.com/keys-pub/keys-ext/http/api

Index

type CreateInviteResponse

type CreateInviteResponse struct {
	Code string `json:"code"`
}

CreateInviteResponse ...

type Data

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

Data for request body.

type Error

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

Error ...

type EventsResponse

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

EventsResponse ...

type InviteResponse

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

InviteResponse ...

type MessagesResponse

type MessagesResponse struct {
	Messages []*events.Event `json:"msgs"`
	Index    int64           `json:"idx"`
}

MessagesResponse ...

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"`
	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 ...

type VaultResponse

type VaultResponse struct {
	Vault []*events.Event `json:"vault"`
	Index int64           `json:"idx"`
}

VaultResponse ...

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier