Documentation ¶
Index ¶
- Constants
- Variables
- func InitLogger(traceHandle io.Writer, debugHandle io.Writer, infoHandle io.Writer, ...)
- func RenderTemplate(tmpfile string, pairs map[string]interface{}) (string, error)
- type AsyncResponsePayload
- type AsyncStatus
- type EmptyResponse
- type ErrResponse
- type ErrResponsePayload
- type Error
- type LookupList
- type ResponseData
- type StatusResponsePayload
- type SyncStatus
Constants ¶
const ( //LookupFile ... LookupFile = iota + 1 //LookupKey ... LookupKey = iota + 1 //LookupSubkey ... LookupSubkey = iota + 1 //LookupDefaultValue ... LookupDefaultValue = iota + 1 )
Variables ¶
var ( //LogTrace ... LogTrace *log.Logger //LogDebug ... LogDebug *log.Logger //LogInfo ... LogInfo *log.Logger //LogWarning ... LogWarning *log.Logger //LogError ... LogError *log.Logger )
var Config gonfig.Gonfig
Config - Contains struct for reading global configuration values
var GlobalConfig struct { ListenPort int DevelopmentMode bool }
GlobalConfig - Struct contains all Global Values used by the application
var RedisClient *redis.Client
RedisClient - System client to access Reds
Functions ¶
Types ¶
type AsyncResponsePayload ¶
type AsyncResponsePayload struct { ID string `json:"id,omitempty"` Location string `json:"location,omitempty"` }
AsyncResponsePayload is the payload returned when initiated the asynchronous API call
type AsyncStatus ¶
AsyncStatus represents the onboarding status with message
type EmptyResponse ¶
type EmptyResponse struct { }
EmptyResponse - Is a empty struct used when Search/List returns no rows.
func (*EmptyResponse) Render ¶
func (res *EmptyResponse) Render(w http.ResponseWriter, r *http.Request) error
Render implements the chi Renderer interface, for EmptyResponse
type ErrResponse ¶
type ErrResponse struct { Code string `json:"code"` Message string `json:"message,omitempty"` Detail string `json:"detail,omitempty"` MoreInfo string `json:"moreInfo,omitempty"` }
ErrResponse is the error schema based on intuit standard
type ErrResponsePayload ¶
type ErrResponsePayload struct { HTTPStatusCode int `json:"-"` // http response status code Error []ErrResponse `json:"error"` }
ErrResponsePayload is the generic API response structure for error return
func (*ErrResponsePayload) Render ¶
func (res *ErrResponsePayload) Render(w http.ResponseWriter, r *http.Request) error
Render implements the chi Renderer interface, it makes sure to set the correct Content-Type
type LookupList ¶
LookupList describes cluster lookup list
type ResponseData ¶
type ResponseData struct { }
ResponseData contains the actual data for the perticular API. e.g. for iksm operation it has all the namespace info
type StatusResponsePayload ¶
type StatusResponsePayload struct { Message string `json:"message,omitempty"` Status AsyncStatus `json:"status,omitempty"` AsyncResponsePayload }
StatusResponsePayload is for asynchronous API status
func (*StatusResponsePayload) Render ¶
func (res *StatusResponsePayload) Render(w http.ResponseWriter, r *http.Request) error
Render implements the chi Renderer interface, it makes sure to set the correct Content-Type
type SyncStatus ¶
SyncStatus represents the onboarding status with message