sdk

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2025 License: MIT Imports: 12 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 {
	// contains filtered or unexported fields
}

Client is the SDK client for dp-files-api

func New

func New(filesAPIURL, authToken string) *Client

New creates a new instance of Client for the service

func NewWithHealthClient

func NewWithHealthClient(hcCli *health.Client, authToken string) *Client

NewWithHealthClient creates a new instance of Client, reusing the URL and Clienter from the provided health check client

func (*Client) Checker

func (c *Client) Checker(ctx context.Context, check *healthcheck.CheckState) error

Checker calls files api health endpoint and returns a check object to the caller

func (*Client) CreateFileEvent

func (c *Client) CreateFileEvent(ctx context.Context, event files.FileEvent) (*files.FileEvent, error)

CreateFileEvent creates a new file event in the audit log and returns the created event

func (*Client) Health

func (c *Client) Health() *health.Client

Health returns the underlying Healthcheck Client for this API client

func (*Client) URL

func (c *Client) URL() string

URL returns the URL used by this client

type Error

type Error struct {
	Code        string `json:"code"`
	Description string `json:"description"`
}

Error represents a single error in the error response

type ErrorResponse

type ErrorResponse struct {
	Errors []Error `json:"errors"`
}

ErrorResponse represents an error response from the API

Jump to

Keyboard shortcuts

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