Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ERR_CLIENT_IS_NIL client is nil object, before use provider need initiate client ERR_CLIENT_IS_NIL = New(-1, http.StatusInternalServerError, codes.Internal, "client is nil") )
Functions ¶
This section is empty.
Types ¶
type Status ¶
type Status struct { ProviderStatusCode any `json:"provider_status_code" xml:"provider_status_code"` GrpcStatusCode codes.Code `json:"grpc_status_code" xml:"grpc_status_code"` HttpStatusCode int `json:"http_status_code" xml:"http_status_code"` Message string `json:"message" xml:"message"` }
func New ¶
func New(providerStatusCode any, httpStatusCode int, grpcCode codes.Code, message string, params ...interface{}) *Status
New create new pgp status
func (*Status) GrpcStatus ¶
GrpcStatus create grpc status
func (*Status) HttpError ¶
func (e *Status) HttpError(w http.ResponseWriter)
HttpError create http status
Click to show internal directories.
Click to hide internal directories.