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 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
SetupTestEnv sets up test environment variables
func TeardownTestEnv ¶ added in v1.0.3
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
Click to show internal directories.
Click to hide internal directories.