crest

package
v0.0.0-...-438e69e Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2016 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateFRObjects

func CreateFRObjects(in io.Reader, overwrite, continueOnError bool) (err error)

Read in an Object from the reader and create it in the ForgeRock stack todo: Check for overwrite,

func RegisterCreateObjectHandler

func RegisterCreateObjectHandler(objectKinds []string, handler CreateObjectHandler)

register Create Object handlers for the given object types

Types

type CRESTResult

type CRESTResult struct {
	Result                 []interface{} `json:"result"`
	ResultCount            int64         `json:"resultCount"`
	PagedResultsCookie     string        `json:"pagedResultsCookie`
	RemainingPagedResults  int64         `json:"remainingPagedResults"`
	TotalPagedResults      int64         `json:"totalPagedResults"`
	TotalPagedResultPolicy string        `json:"totalPagedResultsPolicy"`
}

A query response returned from CREST

func GetCRESTResult

func GetCRESTResult(req *http.Request) (CRESTResult, error)

Make a CREST request. http is already set up with the method, url and any cookies/ headers

type CreateObjectHandler

type CreateObjectHandler func(obj *FRObject, overwrite, continueOnError bool) error

A function that knows how to create an Object of a certain type. For example, create a policy object in OpenAM

type FRObject

type FRObject struct {
	Kind     string            `json:"kind"` // Object type
	Metadata map[string]string `json:"metadata"`
	Items    *[]interface{}    `json:"spec"`
}

Represents a serialized object on disk. We add some metadata and object type information so we can deserialize to the right object

func ReadFRConfig

func ReadFRConfig(in io.Reader) (obj *FRObject, err error)

Read in FR Object from a stream. The stream is assumed to be JSON or YAML We use the YAML decoder because YAML is a superset of JSON So this works with both types

func (*FRObject) Marshal

func (obj *FRObject) Marshal(format string) (str string, err error)

Jump to

Keyboard shortcuts

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