publish

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2023 License: GPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFile

func GetFile(siteID, path string) ([]byte, error)

func GetSiteOwner

func GetSiteOwner(siteID string) (string, error)

func GetSiteSlug

func GetSiteSlug(siteID string) (string, error)

func GetSlug

func GetSlug(slug string) (slugResponse, error)

func NewFile

func NewFile(file *File) error

func RemoveFile

func RemoveFile(siteID, path string) error

func SetSlug

func SetSlug(slug, id string) error

Types

type File

type File struct {
	Path  string `json:"path,omitempty"`
	CTime int64  `json:"ctime,omitempty"`
	Hash  string `json:"hash,omitempty"`
	MTime int64  `json:"mtime,omitempty"`
	Size  int64  `json:"size,omitempty"`
	Data  []byte `json:"data,omitempty"`
	Site  string `json:"site,omitempty"`
}

func GetFiles

func GetFiles(siteID string) ([]*File, error)

type Site

type Site struct {
	ID      string `json:"id,omitempty"`
	Host    string `json:"host,omitempty"`
	Created int64  `json:"created,omitempty"`
	Owner   string `json:"owner,omitempty"`
	Slug    string `json:"slug,omitempty"`
	Options string `json:"options,omitempty"`
	Size    int64  `json:"size"`
}

func CreateSite

func CreateSite(owner string) (*Site, error)

func GetSites

func GetSites(userEmail string) ([]*Site, error)

Jump to

Keyboard shortcuts

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