operations

package
v0.0.0-...-996d052 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2023 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const AddAccUpdaterBadRequestCode int = 400

AddAccUpdaterBadRequestCode is the HTTP code returned for type AddAccUpdaterBadRequest

View Source
const AddAccUpdaterCreatedCode int = 201

AddAccUpdaterCreatedCode is the HTTP code returned for type AddAccUpdaterCreated

View Source
const AddAccUpdaterInternalServerErrorCode int = 500

AddAccUpdaterInternalServerErrorCode is the HTTP code returned for type AddAccUpdaterInternalServerError

View Source
const AddAccUpdaterOKCode int = 200

AddAccUpdaterOKCode is the HTTP code returned for type AddAccUpdaterOK

View Source
const DelAccUpdaterBadRequestCode int = 400

DelAccUpdaterBadRequestCode is the HTTP code returned for type DelAccUpdaterBadRequest

View Source
const DelAccUpdaterInternalServerErrorCode int = 500

DelAccUpdaterInternalServerErrorCode is the HTTP code returned for type DelAccUpdaterInternalServerError

View Source
const DelAccUpdaterOKCode int = 200

DelAccUpdaterOKCode is the HTTP code returned for type DelAccUpdaterOK

View Source
const GetAdsStatsBadRequestCode int = 400

GetAdsStatsBadRequestCode is the HTTP code returned for type GetAdsStatsBadRequest

View Source
const GetAdsStatsInternalServerErrorCode int = 500

GetAdsStatsInternalServerErrorCode is the HTTP code returned for type GetAdsStatsInternalServerError

View Source
const GetAdsStatsOKCode int = 200

GetAdsStatsOKCode is the HTTP code returned for type GetAdsStatsOK

View Source
const GetAdsStatsUnauthorizedCode int = 401

GetAdsStatsUnauthorizedCode is the HTTP code returned for type GetAdsStatsUnauthorized

View Source
const GetCampaignsStatsBadRequestCode int = 400

GetCampaignsStatsBadRequestCode is the HTTP code returned for type GetCampaignsStatsBadRequest

View Source
const GetCampaignsStatsInternalServerErrorCode int = 500

GetCampaignsStatsInternalServerErrorCode is the HTTP code returned for type GetCampaignsStatsInternalServerError

View Source
const GetCampaignsStatsOKCode int = 200

GetCampaignsStatsOKCode is the HTTP code returned for type GetCampaignsStatsOK

View Source
const GetCampaignsStatsUnauthorizedCode int = 401

GetCampaignsStatsUnauthorizedCode is the HTTP code returned for type GetCampaignsStatsUnauthorized

Variables

This section is empty.

Functions

This section is empty.

Types

type AddAccUpdater

type AddAccUpdater struct {
	Context *middleware.Context
	Handler AddAccUpdaterHandler
}
AddAccUpdater swagger:route POST / addAccUpdater

Starts loading account ad and campaign statistic or raise account loading task in line

Response for new account is 201 CREATED
Response for raising in line is 200 OK

func NewAddAccUpdater

func NewAddAccUpdater(ctx *middleware.Context, handler AddAccUpdaterHandler) *AddAccUpdater

NewAddAccUpdater creates a new http.Handler for the add acc updater operation

func (*AddAccUpdater) ServeHTTP

func (o *AddAccUpdater) ServeHTTP(rw http.ResponseWriter, r *http.Request)

type AddAccUpdaterBadRequest

type AddAccUpdaterBadRequest struct {

	/*
	  In: Body
	*/
	Payload *model.ErrorResponse `json:"body,omitempty"`
}

AddAccUpdaterBadRequest bad request 400

swagger:response addAccUpdaterBadRequest

func NewAddAccUpdaterBadRequest

func NewAddAccUpdaterBadRequest() *AddAccUpdaterBadRequest

NewAddAccUpdaterBadRequest creates AddAccUpdaterBadRequest with default headers values

func (*AddAccUpdaterBadRequest) SetPayload

func (o *AddAccUpdaterBadRequest) SetPayload(payload *model.ErrorResponse)

SetPayload sets the payload to the add acc updater bad request response

func (*AddAccUpdaterBadRequest) WithPayload

WithPayload adds the payload to the add acc updater bad request response

func (*AddAccUpdaterBadRequest) WriteResponse

func (o *AddAccUpdaterBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type AddAccUpdaterCreated

type AddAccUpdaterCreated struct {

	/*
	  In: Body
	*/
	Payload *model.Ok `json:"body,omitempty"`
}

AddAccUpdaterCreated created 201

swagger:response addAccUpdaterCreated

func NewAddAccUpdaterCreated

func NewAddAccUpdaterCreated() *AddAccUpdaterCreated

NewAddAccUpdaterCreated creates AddAccUpdaterCreated with default headers values

func (*AddAccUpdaterCreated) SetPayload

func (o *AddAccUpdaterCreated) SetPayload(payload *model.Ok)

SetPayload sets the payload to the add acc updater created response

func (*AddAccUpdaterCreated) WithPayload

func (o *AddAccUpdaterCreated) WithPayload(payload *model.Ok) *AddAccUpdaterCreated

WithPayload adds the payload to the add acc updater created response

func (*AddAccUpdaterCreated) WriteResponse

func (o *AddAccUpdaterCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type AddAccUpdaterHandler

type AddAccUpdaterHandler interface {
	Handle(AddAccUpdaterParams, *model.Principal) middleware.Responder
}

AddAccUpdaterHandler interface for that can handle valid add acc updater params

type AddAccUpdaterHandlerFunc

type AddAccUpdaterHandlerFunc func(AddAccUpdaterParams, *model.Principal) middleware.Responder

AddAccUpdaterHandlerFunc turns a function with the right signature into a add acc updater handler

func (AddAccUpdaterHandlerFunc) Handle

Handle executing the request and returning a response

type AddAccUpdaterInternalServerError

type AddAccUpdaterInternalServerError struct {

	/*
	  In: Body
	*/
	Payload *model.ErrorResponse `json:"body,omitempty"`
}

AddAccUpdaterInternalServerError internal server error 500

swagger:response addAccUpdaterInternalServerError

func NewAddAccUpdaterInternalServerError

func NewAddAccUpdaterInternalServerError() *AddAccUpdaterInternalServerError

NewAddAccUpdaterInternalServerError creates AddAccUpdaterInternalServerError with default headers values

func (*AddAccUpdaterInternalServerError) SetPayload

func (o *AddAccUpdaterInternalServerError) SetPayload(payload *model.ErrorResponse)

SetPayload sets the payload to the add acc updater internal server error response

func (*AddAccUpdaterInternalServerError) WithPayload

WithPayload adds the payload to the add acc updater internal server error response

func (*AddAccUpdaterInternalServerError) WriteResponse

func (o *AddAccUpdaterInternalServerError) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type AddAccUpdaterOK

type AddAccUpdaterOK struct {

	/*
	  In: Body
	*/
	Payload *model.Ok `json:"body,omitempty"`
}

AddAccUpdaterOK success 200

swagger:response addAccUpdaterOK

func NewAddAccUpdaterOK

func NewAddAccUpdaterOK() *AddAccUpdaterOK

NewAddAccUpdaterOK creates AddAccUpdaterOK with default headers values

func (*AddAccUpdaterOK) SetPayload

func (o *AddAccUpdaterOK) SetPayload(payload *model.Ok)

SetPayload sets the payload to the add acc updater o k response

func (*AddAccUpdaterOK) WithPayload

func (o *AddAccUpdaterOK) WithPayload(payload *model.Ok) *AddAccUpdaterOK

WithPayload adds the payload to the add acc updater o k response

func (*AddAccUpdaterOK) WriteResponse

func (o *AddAccUpdaterOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type AddAccUpdaterParams

type AddAccUpdaterParams struct {

	// HTTP Request Object
	HTTPRequest *http.Request `json:"-"`

	/*
	  Required: true
	  Min Length: 30
	  In: header
	*/
	XRequestID string
	/*
	  Required: true
	  In: query
	*/
	AccountID int64
	/*
	  In: query
	*/
	ClientID *int64
	/*if set, account will be updated without cache from beginning of time
	  In: query
	*/
	Force *bool
	/*
	  Required: true
	  In: query
	*/
	UserID int64
}

AddAccUpdaterParams contains all the bound params for the add acc updater operation typically these are obtained from a http.Request

swagger:parameters addAccUpdater

func NewAddAccUpdaterParams

func NewAddAccUpdaterParams() AddAccUpdaterParams

NewAddAccUpdaterParams creates a new AddAccUpdaterParams object

There are no default values defined in the spec.

func (*AddAccUpdaterParams) BindRequest

func (o *AddAccUpdaterParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error

BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface for simple values it will use straight method calls.

To ensure default values, the struct must have been initialized with NewAddAccUpdaterParams() beforehand.

type AddAccUpdaterURL

type AddAccUpdaterURL struct {
	AccountID int64
	ClientID  *int64
	Force     *bool
	UserID    int64
	// contains filtered or unexported fields
}

AddAccUpdaterURL generates an URL for the add acc updater operation

func (*AddAccUpdaterURL) Build

func (o *AddAccUpdaterURL) Build() (*url.URL, error)

Build a url path and query string

func (*AddAccUpdaterURL) BuildFull

func (o *AddAccUpdaterURL) BuildFull(scheme, host string) (*url.URL, error)

BuildFull builds a full url with scheme, host, path and query string

func (*AddAccUpdaterURL) Must

func (o *AddAccUpdaterURL) Must(u *url.URL, err error) *url.URL

Must is a helper function to panic when the url builder returns an error

func (*AddAccUpdaterURL) SetBasePath

func (o *AddAccUpdaterURL) SetBasePath(bp string)

SetBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

func (*AddAccUpdaterURL) String

func (o *AddAccUpdaterURL) String() string

String returns the string representation of the path with query string

func (*AddAccUpdaterURL) StringFull

func (o *AddAccUpdaterURL) StringFull(scheme, host string) string

StringFull returns the string representation of a complete url

func (*AddAccUpdaterURL) WithBasePath

func (o *AddAccUpdaterURL) WithBasePath(bp string) *AddAccUpdaterURL

WithBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

type DelAccUpdater

type DelAccUpdater struct {
	Context *middleware.Context
	Handler DelAccUpdaterHandler
}
DelAccUpdater swagger:route DELETE /{account_id} delAccUpdater

Delete account from loading queue and stop regularly updates.

Note: in --loader-acc-list-upd-timeout (default 600s) account list will be updated from cabinets service, if account presented in service, new update will be started.

func NewDelAccUpdater

func NewDelAccUpdater(ctx *middleware.Context, handler DelAccUpdaterHandler) *DelAccUpdater

NewDelAccUpdater creates a new http.Handler for the del acc updater operation

func (*DelAccUpdater) ServeHTTP

func (o *DelAccUpdater) ServeHTTP(rw http.ResponseWriter, r *http.Request)

type DelAccUpdaterBadRequest

type DelAccUpdaterBadRequest struct {

	/*
	  In: Body
	*/
	Payload *model.ErrorResponse `json:"body,omitempty"`
}

DelAccUpdaterBadRequest bad request 400

swagger:response delAccUpdaterBadRequest

func NewDelAccUpdaterBadRequest

func NewDelAccUpdaterBadRequest() *DelAccUpdaterBadRequest

NewDelAccUpdaterBadRequest creates DelAccUpdaterBadRequest with default headers values

func (*DelAccUpdaterBadRequest) SetPayload

func (o *DelAccUpdaterBadRequest) SetPayload(payload *model.ErrorResponse)

SetPayload sets the payload to the del acc updater bad request response

func (*DelAccUpdaterBadRequest) WithPayload

WithPayload adds the payload to the del acc updater bad request response

func (*DelAccUpdaterBadRequest) WriteResponse

func (o *DelAccUpdaterBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type DelAccUpdaterHandler

type DelAccUpdaterHandler interface {
	Handle(DelAccUpdaterParams, *model.Principal) middleware.Responder
}

DelAccUpdaterHandler interface for that can handle valid del acc updater params

type DelAccUpdaterHandlerFunc

type DelAccUpdaterHandlerFunc func(DelAccUpdaterParams, *model.Principal) middleware.Responder

DelAccUpdaterHandlerFunc turns a function with the right signature into a del acc updater handler

func (DelAccUpdaterHandlerFunc) Handle

Handle executing the request and returning a response

type DelAccUpdaterInternalServerError

type DelAccUpdaterInternalServerError struct {

	/*
	  In: Body
	*/
	Payload *model.ErrorResponse `json:"body,omitempty"`
}

DelAccUpdaterInternalServerError internal server error 500

swagger:response delAccUpdaterInternalServerError

func NewDelAccUpdaterInternalServerError

func NewDelAccUpdaterInternalServerError() *DelAccUpdaterInternalServerError

NewDelAccUpdaterInternalServerError creates DelAccUpdaterInternalServerError with default headers values

func (*DelAccUpdaterInternalServerError) SetPayload

func (o *DelAccUpdaterInternalServerError) SetPayload(payload *model.ErrorResponse)

SetPayload sets the payload to the del acc updater internal server error response

func (*DelAccUpdaterInternalServerError) WithPayload

WithPayload adds the payload to the del acc updater internal server error response

func (*DelAccUpdaterInternalServerError) WriteResponse

func (o *DelAccUpdaterInternalServerError) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type DelAccUpdaterOK

type DelAccUpdaterOK struct {

	/*
	  In: Body
	*/
	Payload *model.Ok `json:"body,omitempty"`
}

DelAccUpdaterOK success 200

swagger:response delAccUpdaterOK

func NewDelAccUpdaterOK

func NewDelAccUpdaterOK() *DelAccUpdaterOK

NewDelAccUpdaterOK creates DelAccUpdaterOK with default headers values

func (*DelAccUpdaterOK) SetPayload

func (o *DelAccUpdaterOK) SetPayload(payload *model.Ok)

SetPayload sets the payload to the del acc updater o k response

func (*DelAccUpdaterOK) WithPayload

func (o *DelAccUpdaterOK) WithPayload(payload *model.Ok) *DelAccUpdaterOK

WithPayload adds the payload to the del acc updater o k response

func (*DelAccUpdaterOK) WriteResponse

func (o *DelAccUpdaterOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type DelAccUpdaterParams

type DelAccUpdaterParams struct {

	// HTTP Request Object
	HTTPRequest *http.Request `json:"-"`

	/*
	  Required: true
	  Min Length: 30
	  In: header
	*/
	XRequestID string
	/*
	  Required: true
	  In: path
	*/
	AccountID int64
	/*
	  In: query
	*/
	ClientID *int64
	/*
	  Required: true
	  In: query
	*/
	UserID int64
}

DelAccUpdaterParams contains all the bound params for the del acc updater operation typically these are obtained from a http.Request

swagger:parameters delAccUpdater

func NewDelAccUpdaterParams

func NewDelAccUpdaterParams() DelAccUpdaterParams

NewDelAccUpdaterParams creates a new DelAccUpdaterParams object

There are no default values defined in the spec.

func (*DelAccUpdaterParams) BindRequest

func (o *DelAccUpdaterParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error

BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface for simple values it will use straight method calls.

To ensure default values, the struct must have been initialized with NewDelAccUpdaterParams() beforehand.

type DelAccUpdaterURL

type DelAccUpdaterURL struct {
	AccountID int64

	ClientID *int64
	UserID   int64
	// contains filtered or unexported fields
}

DelAccUpdaterURL generates an URL for the del acc updater operation

func (*DelAccUpdaterURL) Build

func (o *DelAccUpdaterURL) Build() (*url.URL, error)

Build a url path and query string

func (*DelAccUpdaterURL) BuildFull

func (o *DelAccUpdaterURL) BuildFull(scheme, host string) (*url.URL, error)

BuildFull builds a full url with scheme, host, path and query string

func (*DelAccUpdaterURL) Must

func (o *DelAccUpdaterURL) Must(u *url.URL, err error) *url.URL

Must is a helper function to panic when the url builder returns an error

func (*DelAccUpdaterURL) SetBasePath

func (o *DelAccUpdaterURL) SetBasePath(bp string)

SetBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

func (*DelAccUpdaterURL) String

func (o *DelAccUpdaterURL) String() string

String returns the string representation of the path with query string

func (*DelAccUpdaterURL) StringFull

func (o *DelAccUpdaterURL) StringFull(scheme, host string) string

StringFull returns the string representation of a complete url

func (*DelAccUpdaterURL) WithBasePath

func (o *DelAccUpdaterURL) WithBasePath(bp string) *DelAccUpdaterURL

WithBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

type GetAdsStats

type GetAdsStats struct {
	Context *middleware.Context
	Handler GetAdsStatsHandler
}
GetAdsStats swagger:route GET /{account_id}/ads getAdsStats

Gives array of stats for set time period. If updatedSince set, then reutrns only stats updated after set time

func NewGetAdsStats

func NewGetAdsStats(ctx *middleware.Context, handler GetAdsStatsHandler) *GetAdsStats

NewGetAdsStats creates a new http.Handler for the get ads stats operation

func (*GetAdsStats) ServeHTTP

func (o *GetAdsStats) ServeHTTP(rw http.ResponseWriter, r *http.Request)

type GetAdsStatsBadRequest

type GetAdsStatsBadRequest struct {

	/*
	  In: Body
	*/
	Payload *model.ErrorResponse `json:"body,omitempty"`
}

GetAdsStatsBadRequest bad request 400

swagger:response getAdsStatsBadRequest

func NewGetAdsStatsBadRequest

func NewGetAdsStatsBadRequest() *GetAdsStatsBadRequest

NewGetAdsStatsBadRequest creates GetAdsStatsBadRequest with default headers values

func (*GetAdsStatsBadRequest) SetPayload

func (o *GetAdsStatsBadRequest) SetPayload(payload *model.ErrorResponse)

SetPayload sets the payload to the get ads stats bad request response

func (*GetAdsStatsBadRequest) WithPayload

WithPayload adds the payload to the get ads stats bad request response

func (*GetAdsStatsBadRequest) WriteResponse

func (o *GetAdsStatsBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type GetAdsStatsHandler

type GetAdsStatsHandler interface {
	Handle(GetAdsStatsParams, *model.Principal) middleware.Responder
}

GetAdsStatsHandler interface for that can handle valid get ads stats params

type GetAdsStatsHandlerFunc

type GetAdsStatsHandlerFunc func(GetAdsStatsParams, *model.Principal) middleware.Responder

GetAdsStatsHandlerFunc turns a function with the right signature into a get ads stats handler

func (GetAdsStatsHandlerFunc) Handle

Handle executing the request and returning a response

type GetAdsStatsInternalServerError

type GetAdsStatsInternalServerError struct {

	/*
	  In: Body
	*/
	Payload *model.ErrorResponse `json:"body,omitempty"`
}

GetAdsStatsInternalServerError internal server error 500

swagger:response getAdsStatsInternalServerError

func NewGetAdsStatsInternalServerError

func NewGetAdsStatsInternalServerError() *GetAdsStatsInternalServerError

NewGetAdsStatsInternalServerError creates GetAdsStatsInternalServerError with default headers values

func (*GetAdsStatsInternalServerError) SetPayload

func (o *GetAdsStatsInternalServerError) SetPayload(payload *model.ErrorResponse)

SetPayload sets the payload to the get ads stats internal server error response

func (*GetAdsStatsInternalServerError) WithPayload

WithPayload adds the payload to the get ads stats internal server error response

func (*GetAdsStatsInternalServerError) WriteResponse

func (o *GetAdsStatsInternalServerError) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type GetAdsStatsOK

type GetAdsStatsOK struct {

	/*
	  In: Body
	*/
	Payload *GetAdsStatsOKBody `json:"body,omitempty"`
}

GetAdsStatsOK pages of Ad

swagger:response getAdsStatsOK

func NewGetAdsStatsOK

func NewGetAdsStatsOK() *GetAdsStatsOK

NewGetAdsStatsOK creates GetAdsStatsOK with default headers values

func (*GetAdsStatsOK) SetPayload

func (o *GetAdsStatsOK) SetPayload(payload *GetAdsStatsOKBody)

SetPayload sets the payload to the get ads stats o k response

func (*GetAdsStatsOK) WithPayload

func (o *GetAdsStatsOK) WithPayload(payload *GetAdsStatsOKBody) *GetAdsStatsOK

WithPayload adds the payload to the get ads stats o k response

func (*GetAdsStatsOK) WriteResponse

func (o *GetAdsStatsOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type GetAdsStatsOKBody

type GetAdsStatsOKBody struct {

	// ads
	Ads *model.AdStatsPage `json:"ads,omitempty"`
}

GetAdsStatsOKBody get ads stats o k body

swagger:model GetAdsStatsOKBody

func (*GetAdsStatsOKBody) ContextValidate

func (o *GetAdsStatsOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this get ads stats o k body based on the context it is used

func (*GetAdsStatsOKBody) MarshalBinary

func (o *GetAdsStatsOKBody) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*GetAdsStatsOKBody) UnmarshalBinary

func (o *GetAdsStatsOKBody) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*GetAdsStatsOKBody) Validate

func (o *GetAdsStatsOKBody) Validate(formats strfmt.Registry) error

Validate validates this get ads stats o k body

type GetAdsStatsParams

type GetAdsStatsParams struct {

	// HTTP Request Object
	HTTPRequest *http.Request `json:"-"`

	/*
	  Required: true
	  Min Length: 30
	  In: header
	*/
	XRequestID string
	/*
	  Required: true
	  In: path
	*/
	AccountID int64
	/*
	  In: query
	*/
	AdIds []int64
	/*
	  In: query
	*/
	ClientID *int64
	/*If presented, return only statistics starting from presented date in Unixtime
	  In: query
	*/
	DateFrom *int64
	/*If presented, return only statistics up to presented date in Unixtime
	  In: query
	*/
	DateTo *int64
	/*Enumeration wanted parameters of requested object
	  In: query
	*/
	Fields []string
	/*If presented, return only statistics up to presented date in Unixtime
	  In: query
	*/
	UpdatedSince *int64
	/*
	  Required: true
	  In: query
	*/
	UserID int64
}

GetAdsStatsParams contains all the bound params for the get ads stats operation typically these are obtained from a http.Request

swagger:parameters getAdsStats

func NewGetAdsStatsParams

func NewGetAdsStatsParams() GetAdsStatsParams

NewGetAdsStatsParams creates a new GetAdsStatsParams object

There are no default values defined in the spec.

func (*GetAdsStatsParams) BindRequest

func (o *GetAdsStatsParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error

BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface for simple values it will use straight method calls.

To ensure default values, the struct must have been initialized with NewGetAdsStatsParams() beforehand.

type GetAdsStatsURL

type GetAdsStatsURL struct {
	AccountID int64

	AdIds        []int64
	ClientID     *int64
	DateFrom     *int64
	DateTo       *int64
	Fields       []string
	UpdatedSince *int64
	UserID       int64
	// contains filtered or unexported fields
}

GetAdsStatsURL generates an URL for the get ads stats operation

func (*GetAdsStatsURL) Build

func (o *GetAdsStatsURL) Build() (*url.URL, error)

Build a url path and query string

func (*GetAdsStatsURL) BuildFull

func (o *GetAdsStatsURL) BuildFull(scheme, host string) (*url.URL, error)

BuildFull builds a full url with scheme, host, path and query string

func (*GetAdsStatsURL) Must

func (o *GetAdsStatsURL) Must(u *url.URL, err error) *url.URL

Must is a helper function to panic when the url builder returns an error

func (*GetAdsStatsURL) SetBasePath

func (o *GetAdsStatsURL) SetBasePath(bp string)

SetBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

func (*GetAdsStatsURL) String

func (o *GetAdsStatsURL) String() string

String returns the string representation of the path with query string

func (*GetAdsStatsURL) StringFull

func (o *GetAdsStatsURL) StringFull(scheme, host string) string

StringFull returns the string representation of a complete url

func (*GetAdsStatsURL) WithBasePath

func (o *GetAdsStatsURL) WithBasePath(bp string) *GetAdsStatsURL

WithBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

type GetAdsStatsUnauthorized

type GetAdsStatsUnauthorized struct {

	/*
	  In: Body
	*/
	Payload *model.ErrorResponse `json:"body,omitempty"`
}

GetAdsStatsUnauthorized unauthorized 400

swagger:response getAdsStatsUnauthorized

func NewGetAdsStatsUnauthorized

func NewGetAdsStatsUnauthorized() *GetAdsStatsUnauthorized

NewGetAdsStatsUnauthorized creates GetAdsStatsUnauthorized with default headers values

func (*GetAdsStatsUnauthorized) SetPayload

func (o *GetAdsStatsUnauthorized) SetPayload(payload *model.ErrorResponse)

SetPayload sets the payload to the get ads stats unauthorized response

func (*GetAdsStatsUnauthorized) WithPayload

WithPayload adds the payload to the get ads stats unauthorized response

func (*GetAdsStatsUnauthorized) WriteResponse

func (o *GetAdsStatsUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type GetCampaignsStats

type GetCampaignsStats struct {
	Context *middleware.Context
	Handler GetCampaignsStatsHandler
}
GetCampaignsStats swagger:route GET /{account_id}/campaigns getCampaignsStats

Gives array of stats for set time period. If updatedSince set, then reutrns only stats updated after set time

func NewGetCampaignsStats

func NewGetCampaignsStats(ctx *middleware.Context, handler GetCampaignsStatsHandler) *GetCampaignsStats

NewGetCampaignsStats creates a new http.Handler for the get campaigns stats operation

func (*GetCampaignsStats) ServeHTTP

func (o *GetCampaignsStats) ServeHTTP(rw http.ResponseWriter, r *http.Request)

type GetCampaignsStatsBadRequest

type GetCampaignsStatsBadRequest struct {

	/*
	  In: Body
	*/
	Payload *model.ErrorResponse `json:"body,omitempty"`
}

GetCampaignsStatsBadRequest bad request 400

swagger:response getCampaignsStatsBadRequest

func NewGetCampaignsStatsBadRequest

func NewGetCampaignsStatsBadRequest() *GetCampaignsStatsBadRequest

NewGetCampaignsStatsBadRequest creates GetCampaignsStatsBadRequest with default headers values

func (*GetCampaignsStatsBadRequest) SetPayload

func (o *GetCampaignsStatsBadRequest) SetPayload(payload *model.ErrorResponse)

SetPayload sets the payload to the get campaigns stats bad request response

func (*GetCampaignsStatsBadRequest) WithPayload

WithPayload adds the payload to the get campaigns stats bad request response

func (*GetCampaignsStatsBadRequest) WriteResponse

func (o *GetCampaignsStatsBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type GetCampaignsStatsHandler

type GetCampaignsStatsHandler interface {
	Handle(GetCampaignsStatsParams, *model.Principal) middleware.Responder
}

GetCampaignsStatsHandler interface for that can handle valid get campaigns stats params

type GetCampaignsStatsHandlerFunc

type GetCampaignsStatsHandlerFunc func(GetCampaignsStatsParams, *model.Principal) middleware.Responder

GetCampaignsStatsHandlerFunc turns a function with the right signature into a get campaigns stats handler

func (GetCampaignsStatsHandlerFunc) Handle

Handle executing the request and returning a response

type GetCampaignsStatsInternalServerError

type GetCampaignsStatsInternalServerError struct {

	/*
	  In: Body
	*/
	Payload *model.ErrorResponse `json:"body,omitempty"`
}

GetCampaignsStatsInternalServerError internal server error 500

swagger:response getCampaignsStatsInternalServerError

func NewGetCampaignsStatsInternalServerError

func NewGetCampaignsStatsInternalServerError() *GetCampaignsStatsInternalServerError

NewGetCampaignsStatsInternalServerError creates GetCampaignsStatsInternalServerError with default headers values

func (*GetCampaignsStatsInternalServerError) SetPayload

SetPayload sets the payload to the get campaigns stats internal server error response

func (*GetCampaignsStatsInternalServerError) WithPayload

WithPayload adds the payload to the get campaigns stats internal server error response

func (*GetCampaignsStatsInternalServerError) WriteResponse

WriteResponse to the client

type GetCampaignsStatsOK

type GetCampaignsStatsOK struct {

	/*
	  In: Body
	*/
	Payload *GetCampaignsStatsOKBody `json:"body,omitempty"`
}

GetCampaignsStatsOK pages of Campaign

swagger:response getCampaignsStatsOK

func NewGetCampaignsStatsOK

func NewGetCampaignsStatsOK() *GetCampaignsStatsOK

NewGetCampaignsStatsOK creates GetCampaignsStatsOK with default headers values

func (*GetCampaignsStatsOK) SetPayload

func (o *GetCampaignsStatsOK) SetPayload(payload *GetCampaignsStatsOKBody)

SetPayload sets the payload to the get campaigns stats o k response

func (*GetCampaignsStatsOK) WithPayload

WithPayload adds the payload to the get campaigns stats o k response

func (*GetCampaignsStatsOK) WriteResponse

func (o *GetCampaignsStatsOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type GetCampaignsStatsOKBody

type GetCampaignsStatsOKBody struct {

	// campaigns
	Campaigns *model.CampaignStatsPage `json:"campaigns,omitempty"`
}

GetCampaignsStatsOKBody get campaigns stats o k body

swagger:model GetCampaignsStatsOKBody

func (*GetCampaignsStatsOKBody) ContextValidate

func (o *GetCampaignsStatsOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this get campaigns stats o k body based on the context it is used

func (*GetCampaignsStatsOKBody) MarshalBinary

func (o *GetCampaignsStatsOKBody) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*GetCampaignsStatsOKBody) UnmarshalBinary

func (o *GetCampaignsStatsOKBody) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*GetCampaignsStatsOKBody) Validate

func (o *GetCampaignsStatsOKBody) Validate(formats strfmt.Registry) error

Validate validates this get campaigns stats o k body

type GetCampaignsStatsParams

type GetCampaignsStatsParams struct {

	// HTTP Request Object
	HTTPRequest *http.Request `json:"-"`

	/*
	  Required: true
	  Min Length: 30
	  In: header
	*/
	XRequestID string
	/*
	  Required: true
	  In: path
	*/
	AccountID int64
	/*
	  In: query
	*/
	CampaignIds []int64
	/*
	  In: query
	*/
	ClientID *int64
	/*If presented, return only statistics starting from presented date in Unixtime
	  In: query
	*/
	DateFrom *int64
	/*If presented, return only statistics up to presented date in Unixtime
	  In: query
	*/
	DateTo *int64
	/*Enumeration wanted parameters of requested object
	  In: query
	*/
	Fields []string
	/*If presented, return only statistics up to presented date in Unixtime
	  In: query
	*/
	UpdatedSince *int64
	/*
	  Required: true
	  In: query
	*/
	UserID int64
}

GetCampaignsStatsParams contains all the bound params for the get campaigns stats operation typically these are obtained from a http.Request

swagger:parameters getCampaignsStats

func NewGetCampaignsStatsParams

func NewGetCampaignsStatsParams() GetCampaignsStatsParams

NewGetCampaignsStatsParams creates a new GetCampaignsStatsParams object

There are no default values defined in the spec.

func (*GetCampaignsStatsParams) BindRequest

func (o *GetCampaignsStatsParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error

BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface for simple values it will use straight method calls.

To ensure default values, the struct must have been initialized with NewGetCampaignsStatsParams() beforehand.

type GetCampaignsStatsURL

type GetCampaignsStatsURL struct {
	AccountID int64

	CampaignIds  []int64
	ClientID     *int64
	DateFrom     *int64
	DateTo       *int64
	Fields       []string
	UpdatedSince *int64
	UserID       int64
	// contains filtered or unexported fields
}

GetCampaignsStatsURL generates an URL for the get campaigns stats operation

func (*GetCampaignsStatsURL) Build

func (o *GetCampaignsStatsURL) Build() (*url.URL, error)

Build a url path and query string

func (*GetCampaignsStatsURL) BuildFull

func (o *GetCampaignsStatsURL) BuildFull(scheme, host string) (*url.URL, error)

BuildFull builds a full url with scheme, host, path and query string

func (*GetCampaignsStatsURL) Must

func (o *GetCampaignsStatsURL) Must(u *url.URL, err error) *url.URL

Must is a helper function to panic when the url builder returns an error

func (*GetCampaignsStatsURL) SetBasePath

func (o *GetCampaignsStatsURL) SetBasePath(bp string)

SetBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

func (*GetCampaignsStatsURL) String

func (o *GetCampaignsStatsURL) String() string

String returns the string representation of the path with query string

func (*GetCampaignsStatsURL) StringFull

func (o *GetCampaignsStatsURL) StringFull(scheme, host string) string

StringFull returns the string representation of a complete url

func (*GetCampaignsStatsURL) WithBasePath

func (o *GetCampaignsStatsURL) WithBasePath(bp string) *GetCampaignsStatsURL

WithBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

type GetCampaignsStatsUnauthorized

type GetCampaignsStatsUnauthorized struct {

	/*
	  In: Body
	*/
	Payload *model.ErrorResponse `json:"body,omitempty"`
}

GetCampaignsStatsUnauthorized unauthorized 400

swagger:response getCampaignsStatsUnauthorized

func NewGetCampaignsStatsUnauthorized

func NewGetCampaignsStatsUnauthorized() *GetCampaignsStatsUnauthorized

NewGetCampaignsStatsUnauthorized creates GetCampaignsStatsUnauthorized with default headers values

func (*GetCampaignsStatsUnauthorized) SetPayload

func (o *GetCampaignsStatsUnauthorized) SetPayload(payload *model.ErrorResponse)

SetPayload sets the payload to the get campaigns stats unauthorized response

func (*GetCampaignsStatsUnauthorized) WithPayload

WithPayload adds the payload to the get campaigns stats unauthorized response

func (*GetCampaignsStatsUnauthorized) WriteResponse

func (o *GetCampaignsStatsUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type StatsAPI

type StatsAPI struct {
	Middleware func(middleware.Builder) http.Handler

	// BasicAuthenticator generates a runtime.Authenticator from the supplied basic auth function.
	// It has a default implementation in the security package, however you can replace it for your particular usage.
	BasicAuthenticator func(security.UserPassAuthentication) runtime.Authenticator

	// APIKeyAuthenticator generates a runtime.Authenticator from the supplied token auth function.
	// It has a default implementation in the security package, however you can replace it for your particular usage.
	APIKeyAuthenticator func(string, string, security.TokenAuthentication) runtime.Authenticator

	// BearerAuthenticator generates a runtime.Authenticator from the supplied bearer token auth function.
	// It has a default implementation in the security package, however you can replace it for your particular usage.
	BearerAuthenticator func(string, security.ScopedTokenAuthentication) runtime.Authenticator

	// JSONConsumer registers a consumer for the following mime types:
	//   - application/json
	JSONConsumer runtime.Consumer

	// JSONProducer registers a producer for the following mime types:
	//   - application/json
	JSONProducer runtime.Producer

	// APIKeyAuthAuth registers a function that takes a token and returns a principal
	// it performs authentication based on an api key X-System-Token provided in the header
	APIKeyAuthAuth func(string) (*model.Principal, error)

	// APIAuthorizer provides access control (ACL/RBAC/ABAC) by providing access to the request and authenticated principal
	APIAuthorizer runtime.Authorizer

	// AddAccUpdaterHandler sets the operation handler for the add acc updater operation
	AddAccUpdaterHandler AddAccUpdaterHandler
	// DelAccUpdaterHandler sets the operation handler for the del acc updater operation
	DelAccUpdaterHandler DelAccUpdaterHandler
	// GetAdsStatsHandler sets the operation handler for the get ads stats operation
	GetAdsStatsHandler GetAdsStatsHandler
	// GetCampaignsStatsHandler sets the operation handler for the get campaigns stats operation
	GetCampaignsStatsHandler GetCampaignsStatsHandler

	// ServeError is called when an error is received, there is a default handler
	// but you can set your own with this
	ServeError func(http.ResponseWriter, *http.Request, error)

	// PreServerShutdown is called before the HTTP(S) server is shutdown
	// This allows for custom functions to get executed before the HTTP(S) server stops accepting traffic
	PreServerShutdown func()

	// ServerShutdown is called when the HTTP(S) server is shut down and done
	// handling all active connections and does not accept connections any more
	ServerShutdown func()

	// Custom command line argument groups with their descriptions
	CommandLineOptionsGroups []swag.CommandLineOptionsGroup

	// User defined logger function.
	Logger func(string, ...interface{})
	// contains filtered or unexported fields
}

StatsAPI Some description of your amazing service

func NewStatsAPI

func NewStatsAPI(spec *loads.Document) *StatsAPI

NewStatsAPI creates a new Stats instance

func (*StatsAPI) AddMiddlewareFor

func (o *StatsAPI) AddMiddlewareFor(method, path string, builder middleware.Builder)

AddMiddlewareFor adds a http middleware to existing handler

func (*StatsAPI) AuthenticatorsFor

func (o *StatsAPI) AuthenticatorsFor(schemes map[string]spec.SecurityScheme) map[string]runtime.Authenticator

AuthenticatorsFor gets the authenticators for the specified security schemes

func (*StatsAPI) Authorizer

func (o *StatsAPI) Authorizer() runtime.Authorizer

Authorizer returns the registered authorizer

func (*StatsAPI) ConsumersFor

func (o *StatsAPI) ConsumersFor(mediaTypes []string) map[string]runtime.Consumer

ConsumersFor gets the consumers for the specified media types. MIME type parameters are ignored here.

func (*StatsAPI) Context

func (o *StatsAPI) Context() *middleware.Context

Context returns the middleware context for the stats API

func (*StatsAPI) DefaultConsumes

func (o *StatsAPI) DefaultConsumes() string

DefaultConsumes returns the default consumes media type

func (*StatsAPI) DefaultProduces

func (o *StatsAPI) DefaultProduces() string

DefaultProduces returns the default produces media type

func (*StatsAPI) Formats

func (o *StatsAPI) Formats() strfmt.Registry

Formats returns the registered string formats

func (*StatsAPI) HandlerFor

func (o *StatsAPI) HandlerFor(method, path string) (http.Handler, bool)

HandlerFor gets a http.Handler for the provided operation method and path

func (*StatsAPI) Init

func (o *StatsAPI) Init()

Init allows you to just initialize the handler cache, you can then recompose the middleware as you see fit

func (*StatsAPI) ProducersFor

func (o *StatsAPI) ProducersFor(mediaTypes []string) map[string]runtime.Producer

ProducersFor gets the producers for the specified media types. MIME type parameters are ignored here.

func (*StatsAPI) RegisterConsumer

func (o *StatsAPI) RegisterConsumer(mediaType string, consumer runtime.Consumer)

RegisterConsumer allows you to add (or override) a consumer for a media type.

func (*StatsAPI) RegisterFormat

func (o *StatsAPI) RegisterFormat(name string, format strfmt.Format, validator strfmt.Validator)

RegisterFormat registers a custom format validator

func (*StatsAPI) RegisterProducer

func (o *StatsAPI) RegisterProducer(mediaType string, producer runtime.Producer)

RegisterProducer allows you to add (or override) a producer for a media type.

func (*StatsAPI) Serve

func (o *StatsAPI) Serve(builder middleware.Builder) http.Handler

Serve creates a http handler to serve the API over HTTP can be used directly in http.ListenAndServe(":8000", api.Serve(nil))

func (*StatsAPI) ServeErrorFor

func (o *StatsAPI) ServeErrorFor(operationID string) func(http.ResponseWriter, *http.Request, error)

ServeErrorFor gets a error handler for a given operation id

func (*StatsAPI) SetDefaultConsumes

func (o *StatsAPI) SetDefaultConsumes(mediaType string)

SetDefaultConsumes returns the default consumes media type

func (*StatsAPI) SetDefaultProduces

func (o *StatsAPI) SetDefaultProduces(mediaType string)

SetDefaultProduces sets the default produces media type

func (*StatsAPI) SetSpec

func (o *StatsAPI) SetSpec(spec *loads.Document)

SetSpec sets a spec that will be served for the clients.

func (*StatsAPI) UseRedoc

func (o *StatsAPI) UseRedoc()

UseRedoc for documentation at /docs

func (*StatsAPI) UseSwaggerUI

func (o *StatsAPI) UseSwaggerUI()

UseSwaggerUI for documentation at /docs

func (*StatsAPI) Validate

func (o *StatsAPI) Validate() error

Validate validates the registrations in the StatsAPI

Jump to

Keyboard shortcuts

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