aslanx

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*httpclient.Client
	// contains filtered or unexported fields
}

func New

func New(host, token string) *Client

func (*Client) AddAuditLog

func (c *Client) AddAuditLog(username, productName, method, function, detail, permissionUUID, requestBody string, log *zap.SugaredLogger) (string, error)

func (*Client) ListSignatures

func (c *Client) ListSignatures(log *zap.SugaredLogger) ([]*Signature, bool, error)

ListSignatures returns all signatures, enabled and err. enabled means signature control is enabled. If the status code is 404, mark enabled as false.

func (*Client) UpdateAuditLog

func (c *Client) UpdateAuditLog(id string, status int, log *zap.SugaredLogger) error

type Signature

type Signature struct {
	ID        string `json:"id,omitempty"`
	Token     string `json:"token"`
	UpdateBy  string `json:"update_by"`
	CreatedAt int64  `json:"created_at"`
	UpdatedAt int64  `json:"updated_at"`
}

Jump to

Keyboard shortcuts

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