github.com/companieshouse/lfp-pay-api@v0.0.0-20230203133422-0ca455cd79f9/service/response_type.go (about)

     1  package service
     2  
     3  // ResponseType enumerates the types of authentication supported
     4  type ResponseType int
     5  
     6  const (
     7  	// InvalidData response
     8  	InvalidData ResponseType = iota
     9  
    10  	// Error response
    11  	Error
    12  
    13  	// Forbidden response
    14  	Forbidden
    15  
    16  	// NotFound response
    17  	NotFound
    18  
    19  	// Success response
    20  	Success
    21  )
    22  
    23  var vals = [...]string{
    24  	"invalid-data",
    25  	"error",
    26  	"forbidden",
    27  	"not-found",
    28  	"success",
    29  }
    30  
    31  // String representation of `ResponseType`
    32  func (a ResponseType) String() string {
    33  	return vals[a]
    34  }