resource

package
v0.0.0-...-5052245 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const APIEndpoint = "https://crudcrud.com/api/<Your API ID>/unicorns"

APIEndpoint is the crudcrud endpoint. You can obtain an endpoint by going to https://crudcrud.com.

Variables

This section is empty.

Functions

func Create

func Create(req handler.Request, prevModel *Model, currentModel *Model) (handler.ProgressEvent, error)

Create handles the Create event from the Cloudformation service.

func Delete

func Delete(req handler.Request, prevModel *Model, currentModel *Model) (handler.ProgressEvent, error)

Delete handles the Delete event from the Cloudformation service.

func List

func List(req handler.Request, prevModel *Model, currentModel *Model) (handler.ProgressEvent, error)

List handles the List event from the Cloudformation service.

func Read

func Read(req handler.Request, prevModel *Model, currentModel *Model) (handler.ProgressEvent, error)

Read handles the Read event from the Cloudformation service.

func Update

func Update(req handler.Request, prevModel *Model, currentModel *Model) (handler.ProgressEvent, error)

Update handles the Update event from the Cloudformation service.

Types

type Model

type Model struct {
	UID   *string `json:",omitempty"`
	Name  *string `json:",omitempty"`
	Color *string `json:",omitempty"`
}

Model is autogenerated from the json schema

type RequestInput

type RequestInput struct {
	// Method is the the HTTP request method.
	Method string
	// URL is the request URL
	URL string
	// Body is the body of the request.
	Body io.Reader
	// Action is the Cloudformation resource action
	// Create, Read, etc...
	Action string
	// Model is the resource model.
	Model *Model
}

RequestInput represents the input when making the HTTP request.

type Unicorn

type Unicorn struct {
	// ID is the ID of the unicorn.
	ID string `json:"_id,omitempty"`
	// Name is the name of the unicorn.
	Name string `json:"name,omitempty"`
	// Color is the color of the unicorn.
	Color string `json:"color,omitempty"`
}

A Unicorn represents a unicorn.

Jump to

Keyboard shortcuts

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