rest

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2017 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterCreateRole

func RegisterCreateRole(r *mux.Router) error

RegisterCreateRole is a mux.Router handler that exposes POST method access on route /build/create_role to create a role.

Types

type RoleInput

type RoleInput struct {
	// Role is a hex encoded string of the role name
	// for example, instead of "role" as the name, its
	// hex encoded version "726f6c65".
	Role string `json:"role" validate:"required,min=2"`

	MinimumSigners uint32 `json:"min_sigs" validate:"required,min=1"`

	Signers []sdk.Actor `json:"signers" validate:"required,min=1"`

	// Sequence is the user defined field whose purpose is to
	// prevent replay attacks when creating a role, since it
	// ensures that for a successful role creation, the previous
	// sequence number should have been looked up by the caller.
	Sequence uint32 `json:"seq" validate:"required,min=1"`
}

RoleInput encapsulates the fields needed to create a role

Jump to

Keyboard shortcuts

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