qnp

package
v0.7.4 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	QLIK_XRF_KEY string = "abcdefghijklmnop"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	ID          string `json:"id" yaml:"id" bson:"id"`
	Name        string `json:"name" yaml:"name" bson:"name"`
	Description string `json:"description" yaml:"description" bson:"description"`
	Enabled     bool   `json:"enabled" yaml:"enabled" bson:"enabled"`
	Created     string `json:"created" yaml:"created" bson:"created"`
	LastUpdate  string `json:"lastUpdate" yaml:"lastUpdate" bson:"lastUpdate"`
}

type AppList

type AppList struct {
	Items      []App `json:"items" yaml:"items" bson:"items"`
	TotalItems int   `json:"totalItems" yaml:"totalItems" bson:"totalItems"`
	Offset     int   `json:"offset" yaml:"offset" bson:"offset"`
	Limit      int   `json:"limit" yaml:"limit" bson:"limit"`
}

type AppListResponse

type AppListResponse struct {
	Data AppList `json:"data" yaml:"data" bson:"data"`
}

type AppResponse

type AppResponse struct {
	Data App `json:"data" yaml:"data" bson:"data"`
}

type AuditLogRecord

type AuditLogRecord struct {
	EventTime   AuditLogTimeStamp
	Source      string
	Event       string
	Target      string
	TargetId    string
	TargetName  string
	Action      string
	AppId       string
	UserId      string
	UserName    string
	IpAddress   string
	Description string
	Data        string
	DataType    string
}

type AuditLogTimeStamp

type AuditLogTimeStamp struct {
	time.Time
}

func (*AuditLogTimeStamp) UnmarshalCSV

func (date *AuditLogTimeStamp) UnmarshalCSV(csv string) (err error)

type Client

type Client struct {
	Cfg Config `json:"config" yaml:"config"`

	Logger *zerolog.Logger `json:"-" yaml:"-"`
	// contains filtered or unexported fields
}

func NewClient

func NewClient(cfg Config) (*Client, *util.Result)

func (*Client) Do

func (c *Client) Do(method string, endpoint string, params map[string]string, body interface{}) ([]byte, *util.Result)

func (*Client) DoFor

func (c *Client) DoFor(usr *qlik.JwtClaim, method string, endpoint string, params map[string]string, body interface{}) ([]byte, *util.Result)

func (*Client) DoRaw

func (c *Client) DoRaw(usr *qlik.JwtClaim, method, endpoint string, extraHeaders, params map[string]string, body interface{}) ([]byte, *util.Result)

func (*Client) DoRequest

func (c *Client) DoRequest(req *http.Request) ([]byte, *util.Result)

func (*Client) DownloadFile

func (c *Client) DownloadFile(url string, folder string) (downloadedFile string, res *util.Result)

func (*Client) Get

func (c *Client) Get(endpoint string, params map[string]string) ([]byte, *util.Result)

func (*Client) GetApp

func (c *Client) GetApp(id string) (*App, *util.Result)

func (*Client) GetApps

func (c *Client) GetApps() ([]App, *util.Result)

func (*Client) GetAuditLogRecords

func (c *Client) GetAuditLogRecords() ([]AuditLogRecord, *util.Result)

func (*Client) GetAuditLogs

func (c *Client) GetAuditLogs() ([]byte, *util.Result)

func (*Client) GetFor

func (c *Client) GetFor(usr *qlik.JwtClaim, endpoint string, params map[string]string) ([]byte, *util.Result)

func (*Client) GetReportPreviewList

func (c *Client) GetReportPreviewList() ([]ReportPreview, *util.Result)

func (*Client) GetReportPreviewThumbnail

func (c *Client) GetReportPreviewThumbnail(id, pn, width, height string) ([]byte, *util.Result)

func (*Client) NSDo

func (c *Client) NSDo(method string, endpoint string, params map[string]string, body interface{}) ([]byte, *util.Result)

func (*Client) NSDoFor

func (c *Client) NSDoFor(usr *qlik.JwtClaim, method string, endpoint string, params map[string]string, body interface{}) ([]byte, *util.Result)

func (*Client) NSDoRaw

func (c *Client) NSDoRaw(usr *qlik.JwtClaim, method, endpoint string, extraHeaders, params map[string]string, body interface{}) ([]byte, *util.Result)

func (*Client) NSGet

func (c *Client) NSGet(endpoint string, params map[string]string) ([]byte, *util.Result)

func (*Client) NSGetFor

func (c *Client) NSGetFor(usr *qlik.JwtClaim, endpoint string, params map[string]string) ([]byte, *util.Result)

func (*Client) NSPost

func (c *Client) NSPost(endpoint string, params map[string]string, body interface{}) ([]byte, *util.Result)

func (*Client) NSPostFor

func (c *Client) NSPostFor(usr *qlik.JwtClaim, endpoint string, params map[string]string, body interface{}) ([]byte, *util.Result)

func (*Client) Post

func (c *Client) Post(endpoint string, params map[string]string, body interface{}) ([]byte, *util.Result)

func (*Client) PostFor

func (c *Client) PostFor(usr *qlik.JwtClaim, endpoint string, params map[string]string, body interface{}) ([]byte, *util.Result)

type Config

type Config struct {
	BaseURI      string               `json:"base_uri,omitempty" yaml:"base_uri,omitempty" bson:"base_uri,omitempty"`
	NewsStandURI string               `json:"news_stand_uri,omitempty" yaml:"news_stand_uri,omitempty" bson:"news_stand_uri,omitempty"`
	User         *qlik.JwtClaim       `json:"user,omitempty" yaml:"user,omitempty" bson:"user,omitempty"`
	KeyPair      *crypto.KeyPairFiles `json:"key_pair,omitempty" yaml:"key_pair,omitempty" bson:"key_pair,omitempty"`
	RsaKeyPair   *crypto.RsaKeyPair
}

func (*Config) ParseKeyPair

func (c *Config) ParseKeyPair() *util.Result

type FilterRequest

type FilterRequest struct {
	ID          string `json:"id" yaml:"id" bson:"id"`
	AppID       string `json:"appId" yaml:"appId" bson:"appId"`
	Name        string `json:"name" yaml:"name" bson:"name"`
	Description string `json:"description" yaml:"description" bson:"description"`
	Enabled     bool   `json:"enabled" yaml:"enabled" bson:"enabled"`
	Created     string `json:"created" yaml:"created" bson:"created"`
	LastUpdate  string `json:"lastUpdate" yaml:"lastUpdate" bson:"lastUpdate"`
}

type NewsstandReportData

type NewsstandReportData struct {
	Title                  string `json:"title,omitempty"`
	Format                 string `json:"format,omitempty"`
	TaskId                 string `json:"taskId,omitempty"`
	FileSize               int64  `json:"fileSize,omitempty"`
	Published              string `json:"published,omitempty"`
	ExecutionId            string `json:"executionId,omitempty"`
	RecipientId            string `json:"recipientId,omitempty"`
	RecipientDomainAccount string `json:"recipientDomainAccount,omitempty"`
}

type ReportPreview

type ReportPreview struct {
	ID           string `json:"id" yaml:"id" bson:"id"`
	Title        string `json:"title" yaml:"title" bson:"title"`
	Description  string `json:"description" yaml:"description" bson:"description"`
	Starred      bool   `json:"starred" yaml:"starred" bson:"starred"`
	Status       string `json:"status" yaml:"status" bson:"status"`
	Created      string `json:"created" yaml:"created" bson:"created"`
	LastUpdate   string `json:"lastUpdate" yaml:"lastUpdate" bson:"lastUpdate"`
	OutputFormat string `json:"outputFormat" yaml:"outputFormat" bson:"outputFormat"`
}

type ReportPreviewFilterRequest

type ReportPreviewFilterRequest struct {
	Page    int
	Count   int
	OrderBy string
	Filter  map[string]interface{}
	Group   map[string]interface{}
	Sorting map[string]interface{}
}

type ReportPreviewListResponse

type ReportPreviewListResponse struct {
	Code   int                      `json:"code" yaml:"code" bson:"code"`
	Result *ReportPreviewListResult `json:"result" yaml:"result" bson:"result"`
}

type ReportPreviewListResult

type ReportPreviewListResult struct {
	Code  int             `json:"code" yaml:"code" bson:"code"`
	Total int             `json:"total" yaml:"total" bson:"total"`
	List  []ReportPreview `json:"list" yaml:"list" bson:"list"`
}

Jump to

Keyboard shortcuts

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