smd

package
v0.0.14 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Host         = "http://localhost"
	BaseEndpoint = "/hsm/v2"
	Port         = 27779
)

Functions

This section is empty.

Types

type Client added in v0.0.7

type Client struct {
	*http.Client
	CACertPool *x509.CertPool
}

func NewClient added in v0.0.7

func NewClient(opts ...Option) *Client

func (*Client) AddRedfishEndpoint added in v0.0.7

func (c *Client) AddRedfishEndpoint(data []byte, headers map[string]string) error

func (*Client) GetComponentEndpoint added in v0.0.7

func (c *Client) GetComponentEndpoint(xname string) error

func (*Client) GetRedfishEndpoints added in v0.0.7

func (c *Client) GetRedfishEndpoints(headers map[string]string, opts ...Option) error

func (*Client) MakeRequest added in v0.0.7

func (c *Client) MakeRequest(url string, method string, body []byte, headers map[string]string) (*http.Response, []byte, error)

This MakeRequest function is a wrapper around the util.MakeRequest function with a couple of niceties with using a smd.Client

func (*Client) UpdateRedfishEndpoint added in v0.0.7

func (c *Client) UpdateRedfishEndpoint(xname string, data []byte, headers map[string]string) error

type Option added in v0.0.7

type Option func(*Client)

func WithCertPool added in v0.0.7

func WithCertPool(certPool *x509.CertPool) Option

func WithHttpClient added in v0.0.7

func WithHttpClient(httpClient *http.Client) Option

func WithSecureTLS added in v0.0.7

func WithSecureTLS(certPath string) Option

Jump to

Keyboard shortcuts

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