protocolsiosdk

package
v0.0.0-...-6256cc4 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: Apache-2.0 Imports: 2 Imported by: 1

README

Package cloudeng.io/webapi/protocolsio/protocolsiosdk

import cloudeng.io/webapi/protocolsio/protocolsiosdk

Package protocolsiosdk provides a minimal SDK for the protocols.io API. See https://apidoc.protocols.io for details.

Constants

ListProtocolsV3Endpoint, GetProtocolV4Endpoint
ListProtocolsV3Endpoint = "https://www.protocols.io/api/v3/protocols"
GetProtocolV4Endpoint = "https://www.protocols.io/api/v4/protocols"

Functions

Func WithPublicToken
func WithPublicToken(ctx context.Context, token string) context.Context

Types

Type Creator
type Creator struct {
	Name       string
	Username   string
	Affilation string
}
Type ListProtocolsV3
type ListProtocolsV3 struct {
	Extras       json.RawMessage
	Items        []json.RawMessage `json:"items"`
	Pagination   Pagination        `json:"pagination"`
	Total        int64             `json:"total"`
	TotalPages   int64             `json:"total_pages"`
	TotalResults int64             `json:"total_results"`
}
Type Pagination
type Pagination struct {
	CurrentPage  int64       `json:"current_page"`
	TotalPages   int64       `json:"total_pages"`
	TotalResults int64       `json:"total_results"`
	NextPage     string      `json:"next_page"`
	PrevPage     interface{} `json:"prev_page"`
	PageSize     int64       `json:"page_size"`
	First        int64       `json:"first"`
	Last         int64       `json:"last"`
	ChangedOn    interface{} `json:"changed_on"`
}
Type Payload
type Payload struct {
	Payload    json.RawMessage `json:"payload"`
	StatusCode int             `json:"status_code"`
}
Type Protocol
type Protocol struct {
	ID          int64  `json:"id"`
	URI         string `json:"uri"`
	URL         string `json:"url"`
	Title       string `json:"title"`
	Description string `json:"description"`
	VersionID   int    `json:"version_id"`
	CreatedOn   int    `json:"created_on"`
	Creator     Creator
}
Type ProtocolPayload
type ProtocolPayload struct {
	Protocol   Protocol `json:"payload"`
	StatusCode int      `json:"status_code"`
}

Documentation

Overview

Package protocolsiosdk provides a minimal SDK for the protocols.io API. See https://apidoc.protocols.io for details.

Index

Constants

View Source
const (
	ListProtocolsV3Endpoint = "https://www.protocols.io/api/v3/protocols"
	GetProtocolV4Endpoint   = "https://www.protocols.io/api/v4/protocols"
)

Variables

This section is empty.

Functions

func WithPublicToken

func WithPublicToken(ctx context.Context, token string) context.Context

Types

type Creator

type Creator struct {
	Name       string
	Username   string
	Affilation string
}

type ListProtocolsV3

type ListProtocolsV3 struct {
	Extras       json.RawMessage
	Items        []json.RawMessage `json:"items"`
	Pagination   Pagination        `json:"pagination"`
	Total        int64             `json:"total"`
	TotalPages   int64             `json:"total_pages"`
	TotalResults int64             `json:"total_results"`
}

type Pagination

type Pagination struct {
	CurrentPage  int64       `json:"current_page"`
	TotalPages   int64       `json:"total_pages"`
	TotalResults int64       `json:"total_results"`
	NextPage     string      `json:"next_page"`
	PrevPage     interface{} `json:"prev_page"`
	PageSize     int64       `json:"page_size"`
	First        int64       `json:"first"`
	Last         int64       `json:"last"`
	ChangedOn    interface{} `json:"changed_on"`
}

type Payload

type Payload struct {
	Payload    json.RawMessage `json:"payload"`
	StatusCode int             `json:"status_code"`
}

type Protocol

type Protocol struct {
	ID          int64  `json:"id"`
	URI         string `json:"uri"`
	URL         string `json:"url"`
	Title       string `json:"title"`
	Description string `json:"description"`
	VersionID   int    `json:"version_id"`
	CreatedOn   int    `json:"created_on"`
	Creator     Creator
}

type ProtocolPayload

type ProtocolPayload struct {
	Protocol   Protocol `json:"payload"`
	StatusCode int      `json:"status_code"`
}

Jump to

Keyboard shortcuts

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