Documentation
      ¶
    
    
  
    
  
    Index ¶
- Constants
 - func RespondJSONObjectWithCode(w http.ResponseWriter, code int, obj interface{})
 - func RespondWithError(w http.ResponseWriter, message string, code int)
 - func RespondWithKeyspaceNotAllowed(w http.ResponseWriter)
 - func Routes(prefix string, operations config.SchemaOperations, singleKeyspace string, ...) []types.Route
 - type InternalError
 
Constants ¶
      View Source
      
  
const ( KeyspacesPathFormat = "v1/keyspaces" TablesPathFormat = "v1/keyspaces/%s/tables" TableSinglePathFormat = "v1/keyspaces/%s/tables/%s" ColumnsPathFormat = "v1/keyspaces/%s/tables/%s/columns" ColumnSinglePathFormat = "v1/keyspaces/%s/tables/%s/columns/%s" RowsPathFormat = "v1/keyspaces/%s/tables/%s/rows" RowSinglePathFormat = "v1/keyspaces/%s/tables/%s/rows/%s" QueryPathFormat = "v1/keyspaces/%s/tables/%s/rows/query" )
Variables ¶
This section is empty.
Functions ¶
func RespondJSONObjectWithCode ¶
func RespondJSONObjectWithCode(w http.ResponseWriter, code int, obj interface{})
RespondJSONObjectWithCode writes the object and status header to the response. Important to note that if this is being used for an error case then an empty return will need to immediately follow the call to this function
func RespondWithError ¶
func RespondWithError(w http.ResponseWriter, message string, code int)
func RespondWithKeyspaceNotAllowed ¶
func RespondWithKeyspaceNotAllowed(w http.ResponseWriter)
Types ¶
type InternalError ¶
type InternalError struct {
	// contains filtered or unexported fields
}
    func (*InternalError) Error ¶
func (e *InternalError) Error() string
func (*InternalError) StatusCode ¶
func (e *InternalError) StatusCode() int
 Click to show internal directories. 
   Click to hide internal directories.