# Functions
BuildInfo return build revision and time string.
CleanURL is similar to path.Clean() but to work on URLs.
Environ is similar to os.Environ() but returning environment as a map instead of an array of strings.
GetCaller returns the location information of the caller of the method that invoked GetCaller.
GetCaller2 is similar to GetCaller but goes up the specified number of frames.
GetMockDbName creates a DB name as follows: <SERVICE_NAME>_<Result of getUniqueMockNameComponent()>.
GetPasswd gets password from stdin.
In returns true if needle is found in haystack.
InitializeService initializes the service with the provided config and starts it.
No description provided by the author
No description provided by the author
No description provided by the author
IsZeroValue checks whether the provided value is equal to the zero value for the type.
KV is a convenience function to create a KeyValue value.
ListenAndServe is same as http.ListenAndServe except it returns the address that will be listened on (which is useful when using arbitrary ports).
No description provided by the author
MakeMultiError creates a single error object out of an array of errors as follows: 1.
No description provided by the author
No description provided by the author
NewAuthMiddleware creates new AuthMiddleware to use.
No description provided by the author
No description provided by the author
NewError constructs an error by formatting text with arguments.
NewError400 creates an HttpError with 400 (http.StatusBadRequest) status code.
NewError403 creates a 403 FORBIDDEN message.
NewError404 creates a 404 NOT FOUND message.
NewError500 creates an HttpError with 500 (http.StatusInternalServerError) status code.
NewErrorConflict creates an HttpError with 409 (http.StatusConflict) status code.
NewError helps to construct new Error structure.
NewMultiError creates a new MultiError object to which errors can be added.
No description provided by the author
No description provided by the author
NewUnprocessableEntityError creates an HttpError with 423 (StatusUnprocessableEntity) status code.
No description provided by the author
ReadKeyFile reads a key from the provided file.
RunNegroni is a convenience function that runs the negroni stack as a provided HTTP server, with the following caveats: 1.
No description provided by the author
ToBool is a convenience function that's like ParseBool but allows also "on"/"off" values.
# Constants
Path for authentication; if this is what is used in the request we will not check the token (because we are attempting to get a token at this point).
Constants.
For passing in Gorilla Mux context the original body data.
For passing in Gorilla Mux context path variables.
For passing in Gorilla Mux context the unmarshalled data.
Constants.
No description provided by the author
No description provided by the author
No description provided by the author
DefaultTimeout, in milliseconds.
Empty string returned when there is a string return but there is an error so no point in returning any value.
No description provided by the author
No description provided by the author
Flags to store.Find operation.
No description provided by the author
Constants.
Body provided.
No description provided by the author
Constants.
Name of the query parameter used for request token.
No description provided by the author
No description provided by the author
No description provided by the author
Constants.
422 (unprocessable entity http://www.restpatterns.org/HTTP_Status_Codes/422_-_Unprocessable_Entity) is not in net/http yet.
JSON.
No description provided by the author
# Variables
ContentTypeMarshallers maps MIME type to Marshaller instances.
DefaultAdminUser is a dummy user having admin role.
List of supported content types to return in a 406 response.
Above list of supported content types wrapped in a struct for converion to JSON.
# Structs
An Attribute of a user is something that is used in the ABAC part of our AuthZ scheme.
AuthMiddleware wrapper for auth.
AuthTokenMessage is returned by Root service upon a client's authentication.
Config is the configuration required for a Romana client library.
Container for various credentials.
No description provided by the author
HttpError is a structure that represents, well, an HTTP error.
No description provided by the author
KeyValue represents a key-value pair (similar to Java's Map.Entry).
LinkResponse structure represents the commonly occurring { "href" : "https://<own-addr>", "rel" : "self" } part of the response.
MultiError is a facility to collect multiple number of errors but present them as a single error interface.
No description provided by the author
Message to register with the root service the actual port a service is listening on.
Raw is a type that can be returned from any service's route and the middleware will not try to marshal it.
RestContext contains the context of the REST request other than the body data that has been unmarshaled.
RestServiceInfo describes information about a running Romana service.
No description provided by the author
RomanaHandler interface to comply with http.Handler.
RomanaTestSuite holds state for use in testing.
Route determines an action taken on a URL pattern/HTTP method.
ServiceUtils represents functionality common to various services.
No description provided by the author
UnwrappedRestHandlerInput is used to pass in http.Request and http.ResponseWriter, should some service like unfettered access directly to them.
User has multiple roles and multiple attributes.
# Interfaces
Marshaller is capable of marshalling and unmarshalling data to/from the wire.
Service is the interface that services implement.
# Type aliases
AuthZChecker takes a user and outputs whether the user is allowed to access a resource.
Represents the type of credential (e.g., certificate, username-password, etc.).
No description provided by the author
No description provided by the author
MakeMessage is a factory function, which should return a pointer to an instance into which we will unmarshal wire data.
RestHandler specifies type of a function that each Route provides.
Routes provided by each service.
Type definitions.