Documentation
¶
Index ¶
- func CreateRepositories(ctx context.Context, numRepositories int, storeInst store.Store, ...) error
- func CreateTestDevice(ctx context.Context, deviceStore store.Device, orgId uuid.UUID, name string, ...)
- func CreateTestDevices(ctx context.Context, numDevices int, deviceStore store.Device, orgId uuid.UUID, ...)
- func CreateTestDevicesWithOffset(ctx context.Context, numDevices int, deviceStore store.Device, orgId uuid.UUID, ...)
- func CreateTestFleet(ctx context.Context, fleetStore store.Fleet, orgId uuid.UUID, name string, ...)
- func CreateTestFleets(ctx context.Context, numFleets int, fleetStore store.Fleet, orgId uuid.UUID, ...)
- func CreateTestTemplateVersion(ctx context.Context, tvStore store.TemplateVersion, orgId uuid.UUID, ...) error
- func CreateTestTemplateVersions(ctx context.Context, numTemplateVersions int, tvStore store.TemplateVersion, ...) error
- func GetEnrollmentIdFromText(text string) string
- func GetExtIP() string
- func GetScriptPath(script string) string
- func GetTopLevelDir() string
- func NewAgentClient(serverUrl string, caCert, clientCert *crypto.TLSCertificateConfig) (*agentclient.ClientWithResponses, error)
- func NewBareHTTPsClient(caCert, clientCert *crypto.TLSCertificateConfig) (*http.Client, error)
- func NewClient(serverUrl string, caCert *crypto.TLSCertificateConfig) (*client.ClientWithResponses, error)
- func NewTestAgentServer(log logrus.FieldLogger, cfg *config.Config, store store.Store, ca *crypto.CA, ...) (*agentserver.AgentServer, net.Listener, error)
- func NewTestApiServer(log logrus.FieldLogger, cfg *config.Config, store store.Store, ca *crypto.CA, ...) (*apiserver.Server, net.Listener, error)
- func NewTestCerts(cfg *config.Config) (*crypto.CA, *crypto.TLSCertificateConfig, *crypto.TLSCertificateConfig, error)
- func NewTestProvider(log logrus.FieldLogger) queues.Provider
- func NewTestStore(cfg config.Config, log *logrus.Logger) (store.Store, string, error)
- func TestEnrollmentApproval() *v1alpha1.EnrollmentRequestApproval
- func TestTempEnv(key, value string) func()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateRepositories ¶
func CreateTestDevice ¶
func CreateTestDevices ¶
func CreateTestFleet ¶
func CreateTestFleets ¶
func GetEnrollmentIdFromText ¶ added in v0.2.0
GetEnrollmentIdFromText returns the enrollment ID from the given text. The enrollment ID is expected to be part of url path like https://example.com/enroll/1234
func GetScriptPath ¶
func GetTopLevelDir ¶
func GetTopLevelDir() string
func NewAgentClient ¶
func NewAgentClient(serverUrl string, caCert, clientCert *crypto.TLSCertificateConfig) (*agentclient.ClientWithResponses, error)
NewClient creates a new client with the given server URL and certificates. If the certs are nil a http client will be created.
func NewBareHTTPsClient ¶
func NewBareHTTPsClient(caCert, clientCert *crypto.TLSCertificateConfig) (*http.Client, error)
func NewClient ¶
func NewClient(serverUrl string, caCert *crypto.TLSCertificateConfig) (*client.ClientWithResponses, error)
NewClient creates a new client with the given server URL and certificates. If the certs are nil a http client will be created.
func NewTestAgentServer ¶
func NewTestAgentServer(log logrus.FieldLogger, cfg *config.Config, store store.Store, ca *crypto.CA, serverCerts *crypto.TLSCertificateConfig) (*agentserver.AgentServer, net.Listener, error)
NewTestServer creates a new test server and returns the server and the listener listening on localhost's next available port.
func NewTestApiServer ¶
func NewTestApiServer(log logrus.FieldLogger, cfg *config.Config, store store.Store, ca *crypto.CA, serverCerts *crypto.TLSCertificateConfig, provider queues.Provider) (*apiserver.Server, net.Listener, error)
NewTestServer creates a new test server and returns the server and the listener listening on localhost's next available port.
func NewTestCerts ¶
func NewTestCerts(cfg *config.Config) (*crypto.CA, *crypto.TLSCertificateConfig, *crypto.TLSCertificateConfig, error)
NewTestCerts creates new test certificates in the service certstore and returns the CA, server certificate, and enrollment certificate.
func NewTestProvider ¶
func NewTestProvider(log logrus.FieldLogger) queues.Provider
func NewTestStore ¶
NewTestStore creates a new test store and returns the store and the database name.
func TestEnrollmentApproval ¶
func TestEnrollmentApproval() *v1alpha1.EnrollmentRequestApproval
func TestTempEnv ¶
func TestTempEnv(key, value string) func()
TestTempEnv sets the environment variable key to value and returns a function that will reset the environment variable to its original value.
Types ¶
This section is empty.