crowdsec/pkg/models/check_allowlist_response.go

53 lines
1.3 KiB
Go

// Code generated by go-swagger; DO NOT EDIT.
package models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
)
// CheckAllowlistResponse CheckAllowlistResponse
//
// swagger:model CheckAllowlistResponse
type CheckAllowlistResponse struct {
// true if the IP or range is in the allowlist
Allowlisted bool `json:"allowlisted,omitempty"`
// item that matched the provided value
Reason string `json:"reason,omitempty"`
}
// Validate validates this check allowlist response
func (m *CheckAllowlistResponse) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this check allowlist response based on context it is used
func (m *CheckAllowlistResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *CheckAllowlistResponse) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CheckAllowlistResponse) UnmarshalBinary(b []byte) error {
var res CheckAllowlistResponse
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}