vm

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: May 4, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Copyright © 2023 Joost Evertse joustie@gmail.com

Copyright © 2024 NAME HERE <EMAIL ADDRESS>

Copyright © 2024 NAME HERE <EMAIL ADDRESS>

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigureInsecureTransport added in v1.0.3

func ConfigureInsecureTransport()

ConfigureInsecureTransport sets up a global HTTP transport that skips SSL verification This is useful for tests with self-signed certificates

func Contains

func Contains(list []string, item string) bool

Contains checks if a string is in a list

func NewMockServer added in v1.0.3

func NewMockServer(t *testing.T, config MockServerConfig) *httptest.Server

NewMockServer creates a new HTTPS mock server with the given config

func SetupTestEnv added in v1.0.3

func SetupTestEnv(t *testing.T, host string)

SetupTestEnv sets up test environment variables

func TeardownTestEnv added in v1.0.3

func TeardownTestEnv(t *testing.T)

TeardownTestEnv cleans up test environment variables

Types

type MockServerConfig added in v1.0.3

type MockServerConfig struct {
	LoginResponse leostream.AuthResponse
	Paths         map[string]http.HandlerFunc
}

MockServerConfig holds configuration for mock server responses

type Result

type Result struct {
	Assignment_type string `json:"assignment_type"`
	Desktop_name    string `json:"desktop_name"`
	User_id         string `json:"user_id"`
	Os              string `json:"os"`
	DisplayName     string `json:"display_name"`
	MacAddr         string `json:"mac"`
	Address         string `json:"address"`
	Notes           string `json:"notes"`
	Id              string `json:"id"`
}

Create a struct with the fields you want to extract from the response and then marshal it to json or print it as text

Jump to

Keyboard shortcuts

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