client

package
v0.0.0-...-7d3c76e Latest Latest
Warning

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

Go to latest
Published: May 8, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIClient

type APIClient struct {
	// contains filtered or unexported fields
}

func NewAPITLSClient

func NewAPITLSClient(ctx context.Context, baseURL, rootCAPemFilePath string) *APIClient

func (APIClient) GetToken

func (a APIClient) GetToken(ctx context.Context, username, password string) (string, HttpResponseError)

func (APIClient) SendMetrics

func (a APIClient) SendMetrics(ctx context.Context, username, password string, measurements sensor.Measurment) HttpResponseError

type HttpResponseError

type HttpResponseError struct {
	Err        error
	StatusCode int
}

type MailSender

type MailSender struct {
	Subject string   `json:"subject,omitempty"`
	Cc      []string `json:"cc,omitempty"`
	To      []string `json:"to,omitempty"`
	Body    string   `json:"body,omitempty"`
}

type MailSenderClient

type MailSenderClient struct {
	// contains filtered or unexported fields
}

func NewMailSenderTLSClient

func NewMailSenderTLSClient(baseUrl, rootCAPemFilePath string) *MailSenderClient

func (*MailSenderClient) Send

func (m *MailSenderClient) Send(ctx context.Context, sender MailSender) error

func (*MailSenderClient) SendWithAttachments

func (m *MailSenderClient) SendWithAttachments(ctx context.Context, sender MailSender, attachments []string) error

SendWithAttachments sends a mail with attachments to a concrete user.

type UserDto

type UserDto struct {
	Username string `json:"username,omitempty"`
	Password string `json:"password,omitempty"`
}

Jump to

Keyboard shortcuts

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