Documentation ¶
Overview ¶
Package file is a filesystem-based storage backend for KMFDDM.
Index ¶
- type File
- func (s *File) DeleteDeclaration(_ context.Context, identifier string) (bool, error)
- func (s *File) RemoveEnrollmentSet(_ context.Context, enrollmentID, setName string) (bool, error)
- func (s *File) RemoveSetDeclaration(_ context.Context, setName, declarationID string) (bool, error)
- func (s *File) RetrieveDeclaration(_ context.Context, declarationID string) (*ddm.Declaration, error)
- func (s *File) RetrieveDeclarationItemsJSON(_ context.Context, enrollmentID string) ([]byte, error)
- func (s *File) RetrieveDeclarationModTime(ctx context.Context, declarationID string) (time.Time, error)
- func (s *File) RetrieveDeclarationSets(_ context.Context, declarationID string) ([]string, error)
- func (s *File) RetrieveDeclarationStatus(_ context.Context, enrollmentIDs []string) (map[string][]ddm.DeclarationQueryStatus, error)
- func (s *File) RetrieveDeclarations(_ context.Context) ([]string, error)
- func (s *File) RetrieveEnrollmentDeclarationJSON(_ context.Context, declarationID, declarationType, enrollmentID string) ([]byte, error)
- func (s *File) RetrieveEnrollmentIDs(_ context.Context, declarations []string, sets []string, ids []string) ([]string, error)
- func (s *File) RetrieveEnrollmentSets(_ context.Context, enrollmentID string) ([]string, error)
- func (s *File) RetrieveSetDeclarations(_ context.Context, setName string) ([]string, error)
- func (s *File) RetrieveSets(_ context.Context) ([]string, error)
- func (s *File) RetrieveStatusErrors(_ context.Context, enrollmentIDs []string, offset, limit int) (map[string][]storage.StatusError, error)
- func (s *File) RetrieveStatusReport(ctx context.Context, q storage.StatusReportQuery) (*storage.StoredStatusReport, error)
- func (s *File) RetrieveStatusValues(_ context.Context, enrollmentIDs []string, pathPrefix string) (map[string][]storage.StatusValue, error)
- func (s *File) RetrieveTokensJSON(_ context.Context, enrollmentID string) ([]byte, error)
- func (s *File) StoreDeclaration(_ context.Context, d *ddm.Declaration) (bool, error)
- func (s *File) StoreDeclarationStatus(_ context.Context, enrollmentID string, status *ddm.StatusReport) error
- func (s *File) StoreEnrollmentSet(_ context.Context, enrollmentID, setName string) (bool, error)
- func (s *File) StoreSetDeclaration(_ context.Context, setName, declarationID string) (bool, error)
- func (s *File) TouchDeclaration(ctx context.Context, declarationID string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type File ¶
type File struct {
// contains filtered or unexported fields
}
File is a filesystem-based storage backend.
func (*File) DeleteDeclaration ¶
DeleteDeclaration deletes a declaration by its ID. See also the storage package for documentation on the storage interfaces.
func (*File) RemoveEnrollmentSet ¶
RemoveEnrollmentSet removes the association between an enrollment and a set. See also the storage package for documentation on the storage interfaces.
func (*File) RemoveSetDeclaration ¶
RemoveSetDeclaration removes the association between a declaration and a set.
func (*File) RetrieveDeclaration ¶
func (s *File) RetrieveDeclaration(_ context.Context, declarationID string) (*ddm.Declaration, error)
RetrieveDeclaration retrieves a declaration by its ID. See also the storage package for documentation on the storage interfaces.
func (*File) RetrieveDeclarationItemsJSON ¶
RetrieveDeclarationItemsJSON retrieves the DDM declaration-items JSON for an enrollment ID.
func (*File) RetrieveDeclarationModTime ¶ added in v0.4.0
func (s *File) RetrieveDeclarationModTime(ctx context.Context, declarationID string) (time.Time, error)
RetrieveDeclarationModTime retrieves the last modification time of the declaration. See also the storage package for documentation on the storage interfaces.
func (*File) RetrieveDeclarationSets ¶
RetrieveDeclarationSets returns the list of sets associated with a declaration. See also the storage package for documentation on the storage interfaces.
func (*File) RetrieveDeclarationStatus ¶
func (s *File) RetrieveDeclarationStatus(_ context.Context, enrollmentIDs []string) (map[string][]ddm.DeclarationQueryStatus, error)
RetrieveDeclarationStatus retrieves the current status of declarations for the enrollment IDs. See also the storage package for documentation on the storage interfaces.
func (*File) RetrieveDeclarations ¶
RetrieveDeclarations retrieves a slice of all declaration IDs. See also the storage package for documentation on the storage interfaces.
func (*File) RetrieveEnrollmentDeclarationJSON ¶
func (s *File) RetrieveEnrollmentDeclarationJSON(_ context.Context, declarationID, declarationType, enrollmentID string) ([]byte, error)
RetrieveEnrollmentDeclarationJSON retrieves the DDM declaration JSON for an enrollment ID.
func (*File) RetrieveEnrollmentIDs ¶ added in v0.4.0
func (s *File) RetrieveEnrollmentIDs(_ context.Context, declarations []string, sets []string, ids []string) ([]string, error)
RetrieveEnrollmentIDs retrieves MDM enrollment IDs from storage. If a set, declaration, or enrollment ID doesn't exist it is ignored. See also the storage package for documentation on the storage interfaces.
func (*File) RetrieveEnrollmentSets ¶
RetrieveEnrollmentSets returns the slice of sets associated with an enrollment ID. See also the storage package for documentation on the storage interfaces.
func (*File) RetrieveSetDeclarations ¶
RetrieveSetDeclarations returns a slice of declaration IDs that are associated with setName.
func (*File) RetrieveSets ¶
RetrieveSets retrieves the list of all sets. See also the storage package for documentation on the storage interfaces.
func (*File) RetrieveStatusErrors ¶
func (s *File) RetrieveStatusErrors(_ context.Context, enrollmentIDs []string, offset, limit int) (map[string][]storage.StatusError, error)
RetrieveStatusErrors reads DDM errors from CSV file. See also the storage package for documentation on the storage interfaces.
func (*File) RetrieveStatusReport ¶ added in v0.4.0
func (s *File) RetrieveStatusReport(ctx context.Context, q storage.StatusReportQuery) (*storage.StoredStatusReport, error)
RetrieveStatusValues retrieves the status report for an enrollment ID. The file storage backend only supports saving a single (the last) status report. See also the storage package for documentation on the storage interfaces.
func (*File) RetrieveStatusValues ¶
func (s *File) RetrieveStatusValues(_ context.Context, enrollmentIDs []string, pathPrefix string) (map[string][]storage.StatusValue, error)
RetrieveStatusValues returns the status values for the enrollment IDs. The search can be filtered with pathPrefix by using an SQL LIKE-like syntax. See also the storage package for documentation on the storage interfaces.
func (*File) RetrieveTokensJSON ¶
RetrieveDeclarationItemsJSON retrieves the DDM token JSON for an enrollment ID.
func (*File) StoreDeclaration ¶
StoreDeclaration stores a declaration on disk. See also the storage package for documentation on the storage interfaces.
func (*File) StoreDeclarationStatus ¶
func (s *File) StoreDeclarationStatus(_ context.Context, enrollmentID string, status *ddm.StatusReport) error
StoreDeclarationStatus stores a status report from enrollmentID. See also the storage package for documentation on the storage interfaces.
func (*File) StoreEnrollmentSet ¶
StoreEnrollmentSet creates the association between an enrollment and a set. See also the storage package for documentation on the storage interfaces.
func (*File) StoreSetDeclaration ¶
StoreSetDeclaration creates the association between a declaration and a set.