modelscapi

package
v1.5.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 20, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddSignalsRequest

type AddSignalsRequest []*AddSignalsRequestItem

AddSignalsRequest add signals request

All signals request model

swagger:model AddSignalsRequest

func (AddSignalsRequest) ContextValidate

func (m AddSignalsRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this add signals request based on the context it is used

func (AddSignalsRequest) Validate

func (m AddSignalsRequest) Validate(formats strfmt.Registry) error

Validate validates this add signals request

type AddSignalsRequestItem

type AddSignalsRequestItem struct {

	// alert id
	AlertID int64 `json:"alert_id,omitempty"`

	// context
	Context []*AddSignalsRequestItemContextItems0 `json:"context"`

	// created at
	CreatedAt string `json:"created_at,omitempty"`

	// decisions
	Decisions AddSignalsRequestItemDecisions `json:"decisions,omitempty"`

	// machine id
	MachineID string `json:"machine_id,omitempty"`

	// a human readable message
	// Required: true
	Message *string `json:"message"`

	// scenario
	// Required: true
	Scenario *string `json:"scenario"`

	// scenario hash
	// Required: true
	ScenarioHash *string `json:"scenario_hash"`

	// scenario trust
	ScenarioTrust string `json:"scenario_trust,omitempty"`

	// scenario version
	// Required: true
	ScenarioVersion *string `json:"scenario_version"`

	// source
	// Required: true
	Source *AddSignalsRequestItemSource `json:"source"`

	// start at
	// Required: true
	StartAt *string `json:"start_at"`

	// stop at
	// Required: true
	StopAt *string `json:"stop_at"`
}

AddSignalsRequestItem Signal

swagger:model AddSignalsRequestItem

func (*AddSignalsRequestItem) ContextValidate

func (m *AddSignalsRequestItem) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this add signals request item based on the context it is used

func (*AddSignalsRequestItem) MarshalBinary

func (m *AddSignalsRequestItem) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*AddSignalsRequestItem) UnmarshalBinary

func (m *AddSignalsRequestItem) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*AddSignalsRequestItem) Validate

func (m *AddSignalsRequestItem) Validate(formats strfmt.Registry) error

Validate validates this add signals request item

type AddSignalsRequestItemContextItems0

type AddSignalsRequestItemContextItems0 struct {

	// key
	Key string `json:"key,omitempty"`

	// value
	Value string `json:"value,omitempty"`
}

AddSignalsRequestItemContextItems0 add signals request item context items0

swagger:model AddSignalsRequestItemContextItems0

func (*AddSignalsRequestItemContextItems0) ContextValidate

func (m *AddSignalsRequestItemContextItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this add signals request item context items0 based on context it is used

func (*AddSignalsRequestItemContextItems0) MarshalBinary

func (m *AddSignalsRequestItemContextItems0) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*AddSignalsRequestItemContextItems0) UnmarshalBinary

func (m *AddSignalsRequestItemContextItems0) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*AddSignalsRequestItemContextItems0) Validate

Validate validates this add signals request item context items0

type AddSignalsRequestItemDecisions

type AddSignalsRequestItemDecisions []*AddSignalsRequestItemDecisionsItem

AddSignalsRequestItemDecisions Decisions list

swagger:model AddSignalsRequestItemDecisions

func (AddSignalsRequestItemDecisions) ContextValidate

func (m AddSignalsRequestItemDecisions) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this add signals request item decisions based on the context it is used

func (AddSignalsRequestItemDecisions) Validate

Validate validates this add signals request item decisions

type AddSignalsRequestItemDecisionsItem

type AddSignalsRequestItemDecisionsItem struct {

	// duration
	// Required: true
	Duration *string `json:"duration"`

	// (only relevant for GET ops) the unique id
	// Required: true
	ID *int64 `json:"id"`

	// the origin of the decision : cscli, crowdsec
	// Required: true
	Origin *string `json:"origin"`

	// scenario
	// Required: true
	Scenario *string `json:"scenario"`

	// the scope of decision : does it apply to an IP, a range, a username, etc
	// Required: true
	Scope *string `json:"scope"`

	// simulated
	Simulated bool `json:"simulated,omitempty"`

	// the type of decision, might be 'ban', 'captcha' or something custom. Ignored when watcher (cscli/crowdsec) is pushing to APIL.
	// Required: true
	Type *string `json:"type"`

	// until
	Until string `json:"until,omitempty"`

	// the value of the decision scope : an IP, a range, a username, etc
	// Required: true
	Value *string `json:"value"`
}

AddSignalsRequestItemDecisionsItem Decision

swagger:model AddSignalsRequestItemDecisionsItem

func (*AddSignalsRequestItemDecisionsItem) ContextValidate

func (m *AddSignalsRequestItemDecisionsItem) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this add signals request item decisions item based on context it is used

func (*AddSignalsRequestItemDecisionsItem) MarshalBinary

func (m *AddSignalsRequestItemDecisionsItem) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*AddSignalsRequestItemDecisionsItem) UnmarshalBinary

func (m *AddSignalsRequestItemDecisionsItem) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*AddSignalsRequestItemDecisionsItem) Validate

Validate validates this add signals request item decisions item

type AddSignalsRequestItemSource

type AddSignalsRequestItemSource struct {

	// provided as a convenience when the source is an IP
	AsName string `json:"as_name,omitempty"`

	// provided as a convenience when the source is an IP
	AsNumber string `json:"as_number,omitempty"`

	// cn
	Cn string `json:"cn,omitempty"`

	// provided as a convenience when the source is an IP
	IP string `json:"ip,omitempty"`

	// latitude
	Latitude float32 `json:"latitude,omitempty"`

	// longitude
	Longitude float32 `json:"longitude,omitempty"`

	// provided as a convenience when the source is an IP
	Range string `json:"range,omitempty"`

	// the scope of a source : ip,range,username,etc
	// Required: true
	Scope *string `json:"scope"`

	// the value of a source : the ip, the range, the username,etc
	// Required: true
	Value *string `json:"value"`
}

AddSignalsRequestItemSource Source

swagger:model AddSignalsRequestItemSource

func (*AddSignalsRequestItemSource) ContextValidate

func (m *AddSignalsRequestItemSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this add signals request item source based on context it is used

func (*AddSignalsRequestItemSource) MarshalBinary

func (m *AddSignalsRequestItemSource) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*AddSignalsRequestItemSource) UnmarshalBinary

func (m *AddSignalsRequestItemSource) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*AddSignalsRequestItemSource) Validate

func (m *AddSignalsRequestItemSource) Validate(formats strfmt.Registry) error

Validate validates this add signals request item source

type BlocklistLink struct {

	// duration
	// Required: true
	Duration *string `json:"duration"`

	// the name of the blocklist
	// Required: true
	Name *string `json:"name"`

	// the remediation that should be used for the blocklist
	// Required: true
	Remediation *string `json:"remediation"`

	// the scope of decisions in the blocklist
	// Required: true
	Scope *string `json:"scope"`

	// the url from which the blocklist content can be downloaded
	// Required: true
	URL *string `json:"url"`
}

BlocklistLink blocklist link

swagger:model BlocklistLink

func (*BlocklistLink) ContextValidate

func (m *BlocklistLink) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this blocklist link based on context it is used

func (*BlocklistLink) MarshalBinary

func (m *BlocklistLink) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*BlocklistLink) UnmarshalBinary

func (m *BlocklistLink) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*BlocklistLink) Validate

func (m *BlocklistLink) Validate(formats strfmt.Registry) error

Validate validates this blocklist link

type DecisionsDeleteRequest

type DecisionsDeleteRequest []DecisionsDeleteRequestItem

DecisionsDeleteRequest delete decisions

delete decision model

swagger:model DecisionsDeleteRequest

func (DecisionsDeleteRequest) ContextValidate

func (m DecisionsDeleteRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this decisions delete request based on the context it is used

func (DecisionsDeleteRequest) Validate

func (m DecisionsDeleteRequest) Validate(formats strfmt.Registry) error

Validate validates this decisions delete request

type DecisionsDeleteRequestItem

type DecisionsDeleteRequestItem string

DecisionsDeleteRequestItem decisionsIDs

swagger:model DecisionsDeleteRequestItem

func (DecisionsDeleteRequestItem) ContextValidate

func (m DecisionsDeleteRequestItem) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this decisions delete request item based on context it is used

func (DecisionsDeleteRequestItem) Validate

func (m DecisionsDeleteRequestItem) Validate(formats strfmt.Registry) error

Validate validates this decisions delete request item

type DecisionsSyncRequest

type DecisionsSyncRequest []*DecisionsSyncRequestItem

DecisionsSyncRequest sync decisions request

sync decision model

swagger:model DecisionsSyncRequest

func (DecisionsSyncRequest) ContextValidate

func (m DecisionsSyncRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this decisions sync request based on the context it is used

func (DecisionsSyncRequest) Validate

func (m DecisionsSyncRequest) Validate(formats strfmt.Registry) error

Validate validates this decisions sync request

type DecisionsSyncRequestItem

type DecisionsSyncRequestItem struct {

	// alert id
	AlertID int64 `json:"alert_id,omitempty"`

	// created at
	CreatedAt string `json:"created_at,omitempty"`

	// decisions
	Decisions DecisionsSyncRequestItemDecisions `json:"decisions,omitempty"`

	// machine id
	MachineID string `json:"machine_id,omitempty"`

	// a human readable message
	// Required: true
	Message *string `json:"message"`

	// scenario
	// Required: true
	Scenario *string `json:"scenario"`

	// scenario hash
	// Required: true
	ScenarioHash *string `json:"scenario_hash"`

	// scenario trust
	ScenarioTrust string `json:"scenario_trust,omitempty"`

	// scenario version
	// Required: true
	ScenarioVersion *string `json:"scenario_version"`

	// source
	// Required: true
	Source *DecisionsSyncRequestItemSource `json:"source"`

	// start at
	// Required: true
	StartAt *string `json:"start_at"`

	// stop at
	// Required: true
	StopAt *string `json:"stop_at"`
}

DecisionsSyncRequestItem Signal

swagger:model DecisionsSyncRequestItem

func (*DecisionsSyncRequestItem) ContextValidate

func (m *DecisionsSyncRequestItem) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this decisions sync request item based on the context it is used

func (*DecisionsSyncRequestItem) MarshalBinary

func (m *DecisionsSyncRequestItem) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*DecisionsSyncRequestItem) UnmarshalBinary

func (m *DecisionsSyncRequestItem) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*DecisionsSyncRequestItem) Validate

func (m *DecisionsSyncRequestItem) Validate(formats strfmt.Registry) error

Validate validates this decisions sync request item

type DecisionsSyncRequestItemDecisions

type DecisionsSyncRequestItemDecisions []*DecisionsSyncRequestItemDecisionsItem

DecisionsSyncRequestItemDecisions Decisions list

swagger:model DecisionsSyncRequestItemDecisions

func (DecisionsSyncRequestItemDecisions) ContextValidate

func (m DecisionsSyncRequestItemDecisions) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this decisions sync request item decisions based on the context it is used

func (DecisionsSyncRequestItemDecisions) Validate

Validate validates this decisions sync request item decisions

type DecisionsSyncRequestItemDecisionsItem

type DecisionsSyncRequestItemDecisionsItem struct {

	// duration
	// Required: true
	Duration *string `json:"duration"`

	// (only relevant for GET ops) the unique id
	// Required: true
	ID *int64 `json:"id"`

	// the origin of the decision : cscli, crowdsec
	// Required: true
	Origin *string `json:"origin"`

	// scenario
	// Required: true
	Scenario *string `json:"scenario"`

	// the scope of decision : does it apply to an IP, a range, a username, etc
	// Required: true
	Scope *string `json:"scope"`

	// simulated
	Simulated bool `json:"simulated,omitempty"`

	// the type of decision, might be 'ban', 'captcha' or something custom. Ignored when watcher (cscli/crowdsec) is pushing to APIL.
	// Required: true
	Type *string `json:"type"`

	// until
	Until string `json:"until,omitempty"`

	// the value of the decision scope : an IP, a range, a username, etc
	// Required: true
	Value *string `json:"value"`
}

DecisionsSyncRequestItemDecisionsItem Decision

swagger:model DecisionsSyncRequestItemDecisionsItem

func (*DecisionsSyncRequestItemDecisionsItem) ContextValidate

func (m *DecisionsSyncRequestItemDecisionsItem) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this decisions sync request item decisions item based on context it is used

func (*DecisionsSyncRequestItemDecisionsItem) MarshalBinary

func (m *DecisionsSyncRequestItemDecisionsItem) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*DecisionsSyncRequestItemDecisionsItem) UnmarshalBinary

func (m *DecisionsSyncRequestItemDecisionsItem) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*DecisionsSyncRequestItemDecisionsItem) Validate

Validate validates this decisions sync request item decisions item

type DecisionsSyncRequestItemSource

type DecisionsSyncRequestItemSource struct {

	// provided as a convenience when the source is an IP
	AsName string `json:"as_name,omitempty"`

	// provided as a convenience when the source is an IP
	AsNumber string `json:"as_number,omitempty"`

	// cn
	Cn string `json:"cn,omitempty"`

	// provided as a convenience when the source is an IP
	IP string `json:"ip,omitempty"`

	// latitude
	Latitude float32 `json:"latitude,omitempty"`

	// longitude
	Longitude float32 `json:"longitude,omitempty"`

	// provided as a convenience when the source is an IP
	Range string `json:"range,omitempty"`

	// the scope of a source : ip,range,username,etc
	// Required: true
	Scope *string `json:"scope"`

	// the value of a source : the ip, the range, the username,etc
	// Required: true
	Value *string `json:"value"`
}

DecisionsSyncRequestItemSource Source

swagger:model DecisionsSyncRequestItemSource

func (*DecisionsSyncRequestItemSource) ContextValidate

func (m *DecisionsSyncRequestItemSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this decisions sync request item source based on context it is used

func (*DecisionsSyncRequestItemSource) MarshalBinary

func (m *DecisionsSyncRequestItemSource) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*DecisionsSyncRequestItemSource) UnmarshalBinary

func (m *DecisionsSyncRequestItemSource) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*DecisionsSyncRequestItemSource) Validate

func (m *DecisionsSyncRequestItemSource) Validate(formats strfmt.Registry) error

Validate validates this decisions sync request item source

type EnrollRequest

type EnrollRequest struct {

	// attachment_key is generated in your crowdsec backoffice account and allows you to enroll your machines to your BO account
	// Required: true
	// Pattern: ^[a-zA-Z0-9]+$
	AttachmentKey *string `json:"attachment_key"`

	// The name that will be display in the console for the instance
	Name string `json:"name,omitempty"`

	// To force enroll the instance
	Overwrite bool `json:"overwrite,omitempty"`

	// Tags to apply on the console for the instance
	Tags []string `json:"tags"`
}

EnrollRequest enroll request

enroll request model

swagger:model EnrollRequest

func (*EnrollRequest) ContextValidate

func (m *EnrollRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this enroll request based on context it is used

func (*EnrollRequest) MarshalBinary

func (m *EnrollRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*EnrollRequest) UnmarshalBinary

func (m *EnrollRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*EnrollRequest) Validate

func (m *EnrollRequest) Validate(formats strfmt.Registry) error

Validate validates this enroll request

type ErrorResponse

type ErrorResponse struct {

	// more detail on individual errors
	Errors string `json:"errors,omitempty"`

	// Error message
	// Required: true
	Message *string `json:"message"`
}

ErrorResponse error response

error response return by the API

swagger:model ErrorResponse

func (*ErrorResponse) ContextValidate

func (m *ErrorResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this error response based on context it is used

func (*ErrorResponse) MarshalBinary

func (m *ErrorResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*ErrorResponse) UnmarshalBinary

func (m *ErrorResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*ErrorResponse) Validate

func (m *ErrorResponse) Validate(formats strfmt.Registry) error

Validate validates this error response

type GetDecisionsStreamResponse

type GetDecisionsStreamResponse struct {

	// deleted
	Deleted GetDecisionsStreamResponseDeleted `json:"deleted,omitempty"`

	// links
	Links *GetDecisionsStreamResponseLinks `json:"links,omitempty"`

	// new
	New GetDecisionsStreamResponseNew `json:"new,omitempty"`
}

GetDecisionsStreamResponse get decisions stream response

get decision response model

swagger:model GetDecisionsStreamResponse

func (*GetDecisionsStreamResponse) ContextValidate

func (m *GetDecisionsStreamResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this get decisions stream response based on the context it is used

func (*GetDecisionsStreamResponse) MarshalBinary

func (m *GetDecisionsStreamResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*GetDecisionsStreamResponse) UnmarshalBinary

func (m *GetDecisionsStreamResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*GetDecisionsStreamResponse) Validate

func (m *GetDecisionsStreamResponse) Validate(formats strfmt.Registry) error

Validate validates this get decisions stream response

type GetDecisionsStreamResponseDeleted

type GetDecisionsStreamResponseDeleted []*GetDecisionsStreamResponseDeletedItem

GetDecisionsStreamResponseDeleted Decisions list

swagger:model GetDecisionsStreamResponseDeleted

func (GetDecisionsStreamResponseDeleted) ContextValidate

func (m GetDecisionsStreamResponseDeleted) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this get decisions stream response deleted based on the context it is used

func (GetDecisionsStreamResponseDeleted) Validate

Validate validates this get decisions stream response deleted

type GetDecisionsStreamResponseDeletedItem

type GetDecisionsStreamResponseDeletedItem struct {

	// decisions
	// Required: true
	Decisions []string `json:"decisions"`

	// the scope of decision : does it apply to an IP, a range, a username, etc
	// Required: true
	Scope *string `json:"scope"`
}

GetDecisionsStreamResponseDeletedItem get decisions stream response deleted item

swagger:model GetDecisionsStreamResponseDeletedItem

func (*GetDecisionsStreamResponseDeletedItem) ContextValidate

func (m *GetDecisionsStreamResponseDeletedItem) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this get decisions stream response deleted item based on context it is used

func (*GetDecisionsStreamResponseDeletedItem) MarshalBinary

func (m *GetDecisionsStreamResponseDeletedItem) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*GetDecisionsStreamResponseDeletedItem) UnmarshalBinary

func (m *GetDecisionsStreamResponseDeletedItem) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*GetDecisionsStreamResponseDeletedItem) Validate

Validate validates this get decisions stream response deleted item

type GetDecisionsStreamResponseLinks struct {

	// blocklists
	Blocklists []*BlocklistLink `json:"blocklists"`
}

GetDecisionsStreamResponseLinks Decisions list

swagger:model GetDecisionsStreamResponseLinks

func (*GetDecisionsStreamResponseLinks) ContextValidate

func (m *GetDecisionsStreamResponseLinks) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this get decisions stream response links based on the context it is used

func (*GetDecisionsStreamResponseLinks) MarshalBinary

func (m *GetDecisionsStreamResponseLinks) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*GetDecisionsStreamResponseLinks) UnmarshalBinary

func (m *GetDecisionsStreamResponseLinks) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*GetDecisionsStreamResponseLinks) Validate

Validate validates this get decisions stream response links

type GetDecisionsStreamResponseNew

type GetDecisionsStreamResponseNew []*GetDecisionsStreamResponseNewItem

GetDecisionsStreamResponseNew Decisions list

swagger:model GetDecisionsStreamResponseNew

func (GetDecisionsStreamResponseNew) ContextValidate

func (m GetDecisionsStreamResponseNew) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this get decisions stream response new based on the context it is used

func (GetDecisionsStreamResponseNew) Validate

func (m GetDecisionsStreamResponseNew) Validate(formats strfmt.Registry) error

Validate validates this get decisions stream response new

type GetDecisionsStreamResponseNewItem

type GetDecisionsStreamResponseNewItem struct {

	// decisions
	// Required: true
	Decisions []*GetDecisionsStreamResponseNewItemDecisionsItems0 `json:"decisions"`

	// scenario
	// Required: true
	Scenario *string `json:"scenario"`

	// the scope of decision : does it apply to an IP, a range, a username, etc
	// Required: true
	Scope *string `json:"scope"`
}

GetDecisionsStreamResponseNewItem New Decisions

swagger:model GetDecisionsStreamResponseNewItem

func (*GetDecisionsStreamResponseNewItem) ContextValidate

func (m *GetDecisionsStreamResponseNewItem) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this get decisions stream response new item based on the context it is used

func (*GetDecisionsStreamResponseNewItem) MarshalBinary

func (m *GetDecisionsStreamResponseNewItem) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*GetDecisionsStreamResponseNewItem) UnmarshalBinary

func (m *GetDecisionsStreamResponseNewItem) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*GetDecisionsStreamResponseNewItem) Validate

Validate validates this get decisions stream response new item

type GetDecisionsStreamResponseNewItemDecisionsItems0

type GetDecisionsStreamResponseNewItemDecisionsItems0 struct {

	// duration
	// Required: true
	Duration *string `json:"duration"`

	// the value of the decision scope : an IP, a range, a username, etc
	// Required: true
	Value *string `json:"value"`
}

GetDecisionsStreamResponseNewItemDecisionsItems0 get decisions stream response new item decisions items0

swagger:model GetDecisionsStreamResponseNewItemDecisionsItems0

func (*GetDecisionsStreamResponseNewItemDecisionsItems0) ContextValidate

ContextValidate validates this get decisions stream response new item decisions items0 based on context it is used

func (*GetDecisionsStreamResponseNewItemDecisionsItems0) MarshalBinary

MarshalBinary interface implementation

func (*GetDecisionsStreamResponseNewItemDecisionsItems0) UnmarshalBinary

UnmarshalBinary interface implementation

func (*GetDecisionsStreamResponseNewItemDecisionsItems0) Validate

Validate validates this get decisions stream response new item decisions items0

type LoginRequest

type LoginRequest struct {

	// machine_id is a (username) generated by crowdsec
	// Required: true
	// Max Length: 48
	// Min Length: 48
	// Pattern: ^[a-zA-Z0-9]+$
	MachineID *string `json:"machine_id"`

	// Password, should respect the password policy (link to add)
	// Required: true
	Password *string `json:"password"`

	// all scenarios installed
	Scenarios []string `json:"scenarios"`
}

LoginRequest login request

Login request model

swagger:model LoginRequest

func (*LoginRequest) ContextValidate

func (m *LoginRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this login request based on context it is used

func (*LoginRequest) MarshalBinary

func (m *LoginRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*LoginRequest) UnmarshalBinary

func (m *LoginRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*LoginRequest) Validate

func (m *LoginRequest) Validate(formats strfmt.Registry) error

Validate validates this login request

type LoginResponse

type LoginResponse struct {

	// code
	Code int64 `json:"code,omitempty"`

	// expire
	Expire string `json:"expire,omitempty"`

	// token
	Token string `json:"token,omitempty"`
}

LoginResponse login response

Login request model

swagger:model LoginResponse

func (*LoginResponse) ContextValidate

func (m *LoginResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this login response based on context it is used

func (*LoginResponse) MarshalBinary

func (m *LoginResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*LoginResponse) UnmarshalBinary

func (m *LoginResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*LoginResponse) Validate

func (m *LoginResponse) Validate(formats strfmt.Registry) error

Validate validates this login response

type MetricsRequest

type MetricsRequest struct {

	// bouncers
	// Required: true
	Bouncers []*MetricsRequestBouncersItem `json:"bouncers"`

	// machines
	// Required: true
	Machines []*MetricsRequestMachinesItem `json:"machines"`
}

MetricsRequest metrics

push metrics model

swagger:model MetricsRequest

func (*MetricsRequest) ContextValidate

func (m *MetricsRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this metrics request based on the context it is used

func (*MetricsRequest) MarshalBinary

func (m *MetricsRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*MetricsRequest) UnmarshalBinary

func (m *MetricsRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*MetricsRequest) Validate

func (m *MetricsRequest) Validate(formats strfmt.Registry) error

Validate validates this metrics request

type MetricsRequestBouncersItem

type MetricsRequestBouncersItem struct {

	// bouncer name
	CustomName string `json:"custom_name,omitempty"`

	// last bouncer pull date
	LastPull string `json:"last_pull,omitempty"`

	// bouncer type (firewall, php...)
	Name string `json:"name,omitempty"`

	// bouncer version
	Version string `json:"version,omitempty"`
}

MetricsRequestBouncersItem MetricsBouncerInfo

swagger:model MetricsRequestBouncersItem

func (*MetricsRequestBouncersItem) ContextValidate

func (m *MetricsRequestBouncersItem) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this metrics request bouncers item based on context it is used

func (*MetricsRequestBouncersItem) MarshalBinary

func (m *MetricsRequestBouncersItem) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*MetricsRequestBouncersItem) UnmarshalBinary

func (m *MetricsRequestBouncersItem) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*MetricsRequestBouncersItem) Validate

func (m *MetricsRequestBouncersItem) Validate(formats strfmt.Registry) error

Validate validates this metrics request bouncers item

type MetricsRequestMachinesItem

type MetricsRequestMachinesItem struct {

	// last agent push date
	LastPush string `json:"last_push,omitempty"`

	// last agent update date
	LastUpdate string `json:"last_update,omitempty"`

	// agent name
	Name string `json:"name,omitempty"`

	// agent version
	Version string `json:"version,omitempty"`
}

MetricsRequestMachinesItem MetricsAgentInfo

swagger:model MetricsRequestMachinesItem

func (*MetricsRequestMachinesItem) ContextValidate

func (m *MetricsRequestMachinesItem) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this metrics request machines item based on context it is used

func (*MetricsRequestMachinesItem) MarshalBinary

func (m *MetricsRequestMachinesItem) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*MetricsRequestMachinesItem) UnmarshalBinary

func (m *MetricsRequestMachinesItem) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*MetricsRequestMachinesItem) Validate

func (m *MetricsRequestMachinesItem) Validate(formats strfmt.Registry) error

Validate validates this metrics request machines item

type RegisterRequest

type RegisterRequest struct {

	// machine_id is a (username) generated by crowdsec
	// Required: true
	// Pattern: ^[a-zA-Z0-9]+$
	MachineID *string `json:"machine_id"`

	// Password, should respect the password policy (link to add)
	// Required: true
	Password *string `json:"password"`
}

RegisterRequest register request

Register request model

swagger:model RegisterRequest

func (*RegisterRequest) ContextValidate

func (m *RegisterRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this register request based on context it is used

func (*RegisterRequest) MarshalBinary

func (m *RegisterRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*RegisterRequest) UnmarshalBinary

func (m *RegisterRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*RegisterRequest) Validate

func (m *RegisterRequest) Validate(formats strfmt.Registry) error

Validate validates this register request

type ResetPasswordRequest

type ResetPasswordRequest struct {

	// machine_id is a (username) generated by crowdsec
	// Required: true
	// Max Length: 48
	// Min Length: 48
	// Pattern: ^[a-zA-Z0-9]+$
	MachineID *string `json:"machine_id"`

	// Password, should respect the password policy (link to add)
	// Required: true
	Password *string `json:"password"`
}

ResetPasswordRequest resetPassword

ResetPassword request model

swagger:model ResetPasswordRequest

func (*ResetPasswordRequest) ContextValidate

func (m *ResetPasswordRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this reset password request based on context it is used

func (*ResetPasswordRequest) MarshalBinary

func (m *ResetPasswordRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*ResetPasswordRequest) UnmarshalBinary

func (m *ResetPasswordRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*ResetPasswordRequest) Validate

func (m *ResetPasswordRequest) Validate(formats strfmt.Registry) error

Validate validates this reset password request

type SuccessResponse

type SuccessResponse struct {

	// message
	// Required: true
	Message *string `json:"message"`
}

SuccessResponse success response

success response return by the API

swagger:model SuccessResponse

func (*SuccessResponse) ContextValidate

func (m *SuccessResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this success response based on context it is used

func (*SuccessResponse) MarshalBinary

func (m *SuccessResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*SuccessResponse) UnmarshalBinary

func (m *SuccessResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*SuccessResponse) Validate

func (m *SuccessResponse) Validate(formats strfmt.Registry) error

Validate validates this success response

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL