micropub

package
v4.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Update

func Update(properties map[string][]interface{}, req *Request) (map[string][]interface{}, error)

Update updates a set of existing properties with the new request.

Types

type Action

type Action string
const (
	ActionCreate   Action = "create"
	ActionUpdate   Action = "update"
	ActionDelete   Action = "delete"
	ActionUndelete Action = "undelete"
)

type Request

type Request struct {
	Action     Action
	URL        string
	Type       string
	Properties map[string][]interface{}
	Commands   map[string][]interface{}
	Updates    *RequestUpdates
}

func ParseRequest

func ParseRequest(r *http.Request) (*Request, error)

type RequestUpdates

type RequestUpdates struct {
	Replace map[string][]interface{}
	Add     map[string][]interface{}
	Delete  interface{}
}

Jump to

Keyboard shortcuts

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