Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessToken ¶
type AccessToken struct {
Token string `json:"token"`
}
func NewAccessToken ¶
func NewAccessToken(user User, jwtKey string) (AccessToken, error)
func NewAccessTokenFromCookie ¶
func NewAccessTokenFromCookie(r *http.Request) (AccessToken, error)
func NewAccessTokenFromRequest ¶
func NewAccessTokenFromRequest(r *http.Request) AccessToken
func (AccessToken) Verify ¶
func (a AccessToken) Verify(jwtKey string) error
type Container ¶
type Container struct { // the container ID Id string `json:"id"` // the container name Name string `json:"name"` // true if it is an pod infra container IsInfra bool `json:"is_infra"` // true if belongs to a pod, false else IsInPod bool `json:"is_in_pod"` // ID of the pod it belongs to. "" if standalone PodId string `json:"pod_id"` // the container IP address in the podman network IpAddress string `json:"ip_address"` // the port exposed by the container // set manually by the user ExposedPort int `json:"exposed_port"` // the container status Status ContainerStatus `json:"state"` }
func NewContainerFromRow ¶
type ContainerStatus ¶
type ContainerStatus string
const ( Configured ContainerStatus = "configured" Created ContainerStatus = "created" Running ContainerStatus = "running" Stopped ContainerStatus = "stopped" Paused ContainerStatus = "paused" Exited ContainerStatus = "exited" Removing ContainerStatus = "removing" Unknown ContainerStatus = "unknown" BadState ContainerStatus = "bad_state" )
func NewContainerStatus ¶
func NewContainerStatus(s string) ContainerStatus
func (ContainerStatus) String ¶
func (p ContainerStatus) String() string
type DomainName ¶
func NewDomainName ¶
func NewDomainName(scan func(dest ...interface{}) error) (DomainName, error)
type InfraLog ¶
type InfraLog struct { Timestamp time.Time `json:"timestamp"` Cpu float32 `json:"cpu"` Memory float32 `json:"memory"` Disk float32 `json:"disk"` }
func NewInfraLog ¶
type LogResponseWriter ¶
type LogResponseWriter struct { http.ResponseWriter StatusCode int Buf bytes.Buffer }
https://stackoverflow.com/questions/64243247/go-gorilla-log-each-request-duration-and-status-code
func NewLogResponseWriter ¶
func NewLogResponseWriter(w http.ResponseWriter) *LogResponseWriter
func (*LogResponseWriter) WriteHeader ¶
func (w *LogResponseWriter) WriteHeader(code int)
type NetworkLog ¶
type NetworkLog struct { Timestamp time.Time `json:"timestamp"` RequestHost string `json:"request_host"` RequestMethod string `json:"request_method"` RequestPath string `json:"request_path"` RequestBody []byte `json:"request_body"` RequestArgs string `json:"request_args"` ResponseStatusCode int `json:"response_status_code"` ResponseDuration int `json:"response_duration"` ResponseBody []byte `json:"response_body"` }
func NewNetworkLog ¶
func NewNetworkLog(scan func(dest ...interface{}) error) (NetworkLog, error)
type PodmanPod ¶
Click to show internal directories.
Click to hide internal directories.