gitstore

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2025 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package gitstore provides Git-based storage for device compliance data.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

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

Store provides Git-based storage for device compliance data using go-git.

func NewLocal

func NewLocal(ctx context.Context, localPath string) (*Store, error)

NewLocal creates a store using a local git repository. If the directory doesn't exist or is not a git repository, it will initialize one.

func NewRemote

func NewRemote(ctx context.Context, gitURL string) (*Store, error)

NewRemote creates a store by cloning a repository to a temp directory.

func (*Store) LoadDevices

func (s *Store) LoadDevices(ctx context.Context) ([]*gitmdm.Device, error)

LoadDevices loads all devices from the git repository.

func (*Store) SaveDevice

func (s *Store) SaveDevice(ctx context.Context, device *gitmdm.Device) error

SaveDevice saves or updates a device's compliance data.

Jump to

Keyboard shortcuts

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