api

package
v0.0.0-...-cc45018 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateEncryptedFoobarHandler

func CreateEncryptedFoobarHandler(w http.ResponseWriter, r *http.Request)

CreateEncryptedFoobarHandler inserts a document to tutorial.foobar. It uses Field Encryption on the field "message" to insert a new Foobar JSON document to the tutorial Database.

func CreateFoobarHandler

func CreateFoobarHandler(w http.ResponseWriter, r *http.Request)

CreateFoobarHandler is

func ReadEncryptedFoobarHandler

func ReadEncryptedFoobarHandler(w http.ResponseWriter, r *http.Request)

ReadEncryptedFoobarHandler reads a document with given id from tutorial.foobar

func ReadFoobarHandler

func ReadFoobarHandler(w http.ResponseWriter, r *http.Request)

ReadFoobarHandler reads a document with given id from tutorial.foobar

Types

type Foobar

type Foobar struct {
	ID      string `json:"_id" bson:"_id"`
	Name    string `json:"name" bson:"name"`
	Message string `json:"message" bson:"message"` //this field is encrypted if added via /foo endpoint, unencrypted if added via /bar endpoint
}

Foobar is

Jump to

Keyboard shortcuts

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