server

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2021 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	IPFSClient *ipfs.Client
	Index      *index.Index
}

Config ...

type Metadata

type Metadata struct {
	Author           string    `json:"author"`
	CreatedAt        time.Time `json:"created_at"`
	EncryptAlgorithm string    `json:"encrypt_algorithm"`
	Objects          []Object  `json:"objects"`
}

Metadata metadata.json

func (*Metadata) String

func (m *Metadata) String() string

type Object

type Object struct {
	Name     string `json:"name"`
	MIMEType string `json:"mime_type"`
	Size     int64  `json:"size"`
}

Object object

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server server

func New

func New(conf *Config) *Server

New ...

func (*Server) Start

func (s *Server) Start(addr string)

Start start http server

type UploadResp

type UploadResp struct {
	Cid string `json:"cid"`
}

UploadResp ...

Jump to

Keyboard shortcuts

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