blob: 276e3b43ad180decf0dca27cd41b2e531a159e34 [file] [edit]
// Code generated by cdpgen. DO NOT EDIT.
// Package audits implements the Audits domain. Audits domain allows
// investigation of page violations and possible improvements.
package audits
import (
"context"
"github.com/mafredri/cdp/protocol/internal"
"github.com/mafredri/cdp/rpcc"
)
// domainClient is a client for the Audits domain. Audits domain allows
// investigation of page violations and possible improvements.
type domainClient struct{ conn *rpcc.Conn }
// NewClient returns a client for the Audits domain with the connection set to conn.
func NewClient(conn *rpcc.Conn) *domainClient {
return &domainClient{conn: conn}
}
// GetEncodedResponse invokes the Audits method. Returns the response body and
// size if it were re-encoded with the specified settings. Only applies to
// images.
func (d *domainClient) GetEncodedResponse(ctx context.Context, args *GetEncodedResponseArgs) (reply *GetEncodedResponseReply, err error) {
reply = new(GetEncodedResponseReply)
if args != nil {
err = rpcc.Invoke(ctx, "Audits.getEncodedResponse", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "Audits.getEncodedResponse", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "Audits", Op: "GetEncodedResponse", Err: err}
}
return
}