Skip to content
Snippets Groups Projects
encode_decode.go 1.01 KiB
Newer Older
  • Learn to ignore specific revisions
  • // Code generated by goa v3.7.0, DO NOT EDIT.
    //
    // health HTTP server encoders and decoders
    //
    // Command:
    // $ goa gen code.vereign.com/gaiax/tsa/policy/design
    
    package server
    
    import (
    	"context"
    	"net/http"
    
    	goahttp "goa.design/goa/v3/http"
    )
    
    // EncodeLivenessResponse returns an encoder for responses returned by the
    // health Liveness endpoint.
    func EncodeLivenessResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error {
    	return func(ctx context.Context, w http.ResponseWriter, v interface{}) error {
    		w.WriteHeader(http.StatusOK)
    		return nil
    	}
    }
    
    // EncodeReadinessResponse returns an encoder for responses returned by the
    // health Readiness endpoint.
    func EncodeReadinessResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error {
    	return func(ctx context.Context, w http.ResponseWriter, v interface{}) error {
    		w.WriteHeader(http.StatusOK)
    		return nil
    	}
    }