Documentation
¶
Overview ¶
Copyright 2026 Pantacor Ltd.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2022 Pantacor Ltd.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2026 Pantacor Ltd. Licensed under the Apache License, Version 2.0.
Index ¶
- Constants
- Variables
- func AddDockerApp(p *Pvr, app *AppData) error
- func AddFragsToState(srcState, patchState map[string]interface{}, frags string) map[string]interface{}
- func AddGitLabPkgApp(p *Pvr, app *AppData) error
- func AddPvApp(p *Pvr, app *AppData) error
- func AddRootFsApp(p *Pvr, app *AppData) error
- func AskForConfirmation(question string) bool
- func CleanPatchSignedPkg(src, patch, target *PvrMap) (err error)
- func CleanRemovedSignatures(initialState, finalState *PvrMap, initialStateBuf []byte) (err error)
- func ContainSymlinks(root string, rewritten map[string]ContainedSymlink) error
- func Copy(dst, src string) error
- func Create(path string, perm os.FileMode) error
- func CreateFolder(path string) error
- func CreateTrail(baseURL string, deviceAccessToken string, state map[string]interface{}) (*resty.Response, error)
- func DeleteSignatureFromState(state PvrMap, stateBuf []byte, delSigKey string, ...) ([]string, error)
- func DownloadFile(uri *url.URL) (string, error)
- func DownloadLayersFromLocalDocker(imageRef string) (io.ReadCloser, error)
- func DownloadSigningCert(url, path string) error
- func DownloadSigningCertWithConfirmation(url, path string, force bool) error
- func ExecCommand(name string, arg ...string) error
- func ExecCommandOut(name string, arg ...string) (string, error)
- func ExpandFragmentsWithSignedParts(src PvrMap, fragments string) (string, error)
- func ExpandPath(path string) (string, error)
- func ExportLocalImage(imageRef string) (io.ReadCloser, error)
- func ExtractFiles(files []string, extractPath string) error
- func FileHasSameSha(path, sha string) (bool, error)
- func FiletoSha(path string) (string, error)
- func FilterByFrags(state map[string]interface{}, frags string) (map[string]interface{}, error)
- func FindWhiteoutsFromLayer(layerPath string) ([]string, error)
- func FixupRepoRef(repoUri string) (string, error)
- func FormatJson(data []byte) ([]byte, error)
- func FormatJsonC(data []byte) ([]byte, error)
- func GetDockerConfigFile(p *Pvr, app *AppData) (map[string]interface{}, error)
- func GetFileContentType(src string) (string, error)
- func GetFromConfigPvs(url, configPath, name string, force bool) (string, error)
- func GetFromRootFs(app *AppData) (string, error)
- func GetGitlabPkgApp(p *Pvr, app *AppData) (string, error)
- func GetImageConfig(img v1.Image) (map[string]interface{}, error)
- func GetImageDigest(img v1.Image) (string, error)
- func GetPersistence(app *AppData) (map[string]string, error)
- func GetPhAuthHeaderTokenKey(authHeader string) (string, error)
- func GetPlatform() string
- func GetStatePatch(initialState, endState []byte) (*[]byte, error)
- func Hardlink(dst, src string) error
- func InstallDockerApp(p *Pvr, app *AppData, appManifest *Source) error
- func InstallGitLabPkgApp(p *Pvr, app *AppData, appManifest *Source) error
- func InstallPVApp(p *Pvr, app *AppData, appManifest *Source) error
- func InstallRootFsApp(p *Pvr, app *AppData, appManifest *Source) error
- func IsFileExists(filePath string) (bool, error)
- func IsLocalDeviceURL(urlStr string) bool
- func IsSha(sha string) bool
- func IsValidUrl(value string) bool
- func LoadLocalImage(app *AppData) error
- func LoginDevice(baseURL string, prn string, secret string) (string, error)
- func Max(x, y int) int
- func MaybeUnzip(filePath string) (resolvedPath string, tempFile string, err error)
- func MaybeUnzipCleanup(tempFile string)
- func MergePatch(srcData, target []byte) ([]byte, error)
- func MergeSummary(dest *JwsVerifySummary, merge ...JwsVerifySummary)
- func Min(x, y int) int
- func Mkdir(path string, perm os.FileMode) error
- func MkdirAll(path string, perm os.FileMode) error
- func OverwriteState(state PvrMap, newState PvrMap)
- func ParseRFC3339(date string) (time.Time, error)
- func PatchState(srcBuff, patchBuff []byte, srcFrags, patchFrag string, merge bool, ...) ([]byte, map[string]interface{}, error)
- func PrintDebugf(format string, a ...interface{}) (n int, err error)
- func PrintDebugln(a ...interface{}) (n int, err error)
- func ProcessWhiteouts(extractPath string, layerPath string, layerNumber int) error
- func ReadArgsFile(filePath string) (map[string]interface{}, error)
- func ReadOrCreateFile(filePath string) (*[]byte, error)
- func ReadUserPasswdFromNetrc(host string) (string, string, error)
- func Remove(path string) error
- func RemoveAll(path string) error
- func RemoveDirContents(dir string) error
- func RenameFile(src string, dst string) (err error)
- func ReportDockerManifestError(err error, image string) error
- func ReportError(err error, knowSolutions ...string) error
- func ResolveDeviceEndpoint(baseURL, value string) (string, error)
- func ResolveInImage(root, p string) (string, error)
- func ResolveInRoot(root, relative string) (string, error)
- func RestoreSymlinks(rewritten map[string]ContainedSymlink) error
- func SafeJoin(root, relative string) (string, error)
- func Scan()
- func SetTempFilesInterrupHandler(tempdir string)
- func ShowOrOpenRegisterLink(baseAPIURL, email, username, password string) error
- func SignatureCoverage(state PvrMap, sigKey string) (protected, excluded []string, err error)
- func SliceContainsItem(slice []string, item string) bool
- func SortObjects(objects map[string]string) []string
- func SprintTmpl(format string, obj interface{}) (string, error)
- func StructToMap(s interface{}) (map[string]interface{}, error)
- func Untar(dst string, src string, options []string) error
- func UpdateDockerApp(p *Pvr, app *AppData, appManifest *Source) (err error)
- func UpdateGitLabPkgApp(p *Pvr, app *AppData, appManifest *Source) error
- func UpdateIfNecessary(c *cli.Context) error
- func UpdatePvApp(p *Pvr, app *AppData, appManifest *Source) error
- func UpdateRootFSApp(p *Pvr, app *AppData, appManifest *Source) error
- func ValidateSourceFlag(source string) error
- func ValidateSquashfsOptions(options string) error
- func WriteConfiguration(filePath string, config *PvrGlobalConfig) error
- func WriteTxtFile(filePath string, content string) error
- type Account
- type ApiError
- type AppData
- type AsyncBody
- type CLIInitResponse
- type CallMethod
- type ContainedSymlink
- type Descriptor
- type DeviceOwnershipStatus
- type DmSource
- type DmVerityJson
- type DockerImage
- type DockerManifest
- type DockerSource
- type EncryptedAccountData
- type FilePut
- type GetAccesstokenMethod
- type GitLabPackage
- type GitLabPackageFile
- type GitLabPkgSource
- type JwsVerifySummary
- type LogFilter
- type LogFormatter
- type LogFormatterJson
- type LogFormatterTemplate
- type Manifest
- type Object
- type ObjectWithAccess
- type PVPKG
- type PVZeroConf
- type PantahubDevice
- type PantahubDevicesJoinToken
- type PkceResponse
- type PollTokenResponse
- type Pvr
- func (p *Pvr) AddApplication(app *AppData, addonly bool) (err error)
- func (p *Pvr) AddFile(globs []string, forceObject bool) error
- func (p *Pvr) AuthConfig(username, password, registry string) authn.Authenticator
- func (p *Pvr) CheckIfIsRunningAsRoot() error
- func (p *Pvr) Cleanup() error
- func (p *Pvr) Commit(msg string, isCheckpoint bool) (err error)
- func (p *Pvr) DeployPvLinks() error
- func (p *Pvr) Diff() (*[]byte, error)
- func (p *Pvr) DmCVerityApply(prefix string) error
- func (p *Pvr) DmCVerityConvert(container string, volume string) error
- func (p *Pvr) DmCryptApply() error
- func (p *Pvr) DoClaim(deviceEp, challenge string) error
- func (p *Pvr) DoDelete(deviceEp string, confirm bool) error
- func (p *Pvr) Export(parts []string, dst string) error
- func (p *Pvr) FindDockerImage(app *AppData) (err error)
- func (p *Pvr) GenerateApplicationSquashFS(app *AppData, appManifest *Source) error
- func (p *Pvr) GenerateApplicationTemplateFiles(appname string, dockerConfig map[string]interface{}, appManifest *Source) error
- func (p *Pvr) GetAppDockerDigest(appname string) (string, error)
- func (p *Pvr) GetAppDockerName(appname string) (string, error)
- func (p *Pvr) GetApplicationInfo(appname string) error
- func (p *Pvr) GetApplicationManifest(appname string) (*Source, error)
- func (p *Pvr) GetApplications() ([]AppData, error)
- func (p *Pvr) GetCPristineJson() ([]byte, error)
- func (p *Pvr) GetDefaultGroup() string
- func (p *Pvr) GetFromRepo(app *AppData) (string, *Source, error)
- func (p *Pvr) GetGitlabPackage(getPath string, merge bool, showFilenames bool, state *PvrMap) (objectsCount int, err error)
- func (p *Pvr) GetGroup(name string) (result string, err error)
- func (p *Pvr) GetJson(uri string) (state map[string]interface{}, err error)
- func (p *Pvr) GetPackageManifest(appname string) (*PVPKG, error)
- func (p *Pvr) GetRemoteImage(imageRef string, auth authn.Authenticator) (v1.Image, error)
- func (p *Pvr) GetRemoteImageForPlatform(imageRef string, platform v1.Platform, auth authn.Authenticator) (v1.Image, error)
- func (p *Pvr) GetRemoteIndex(imageRef string, auth authn.Authenticator) (v1.ImageIndex, error)
- func (p *Pvr) GetRepo(uri string, merge bool, showFilenames bool, state *PvrMap) (objectsCount int, err error)
- func (p *Pvr) GetRepoLocal(getPath string, merge bool, showFilenames bool, state *PvrMap) (objectsCount int, err error)
- func (p *Pvr) GetRepoRemote(url *url.URL, merge bool, showFilenames bool, state *PvrMap) (objectsCount int, err error)
- func (p *Pvr) GetSquashFSDigest(squashFile, appName string) (string, error)
- func (p *Pvr) GetStateJson(uri string) (state map[string]interface{}, err error)
- func (p *Pvr) GetTrackURL(appname string) (string, error)
- func (p *Pvr) GetWorkingGroupsJson() (result []interface{}, err error)
- func (p *Pvr) GetWorkingJson() ([]byte, []string, error)
- func (p *Pvr) GetWorkingJsonMap() (resMap map[string]interface{}, untracked []string, err error)
- func (p *Pvr) HasGroup(name string) bool
- func (p *Pvr) HasGroups() bool
- func (p *Pvr) Import(src string) error
- func (p *Pvr) Init(objectsDir string) error
- func (p *Pvr) InitCustom(customInitJson string, objectsDir string) error
- func (p *Pvr) InstallApplication(app *AppData) (err error)
- func (p *Pvr) JSONDiff() (*[]byte, error)
- func (p *Pvr) JwsSign(name string, privKeyPath string, match *PvsMatch, options *PvsOptions) error
- func (p *Pvr) JwsSignAuto(keyPath string, part string, options *PvsOptions) error
- func (p *Pvr) JwsSignPvs(privKeyPath string, pvsPath string, options *PvsOptions) error
- func (p *Pvr) JwsVerifyPvs(keyPath string, caCerts string, pvsPath string, includePayload bool) (*JwsVerifySummary, error)
- func (p *Pvr) ListApplications() error
- func (p *Pvr) LoadRemoteImage(app *AppData) error
- func (p *Pvr) MakeSquash(rootfsPath string, app *AppData) error
- func (p *Pvr) MergeAppSrcArgs(appname string, args map[string]interface{}, config map[string]interface{}, ...) error
- func (p *Pvr) Post(uri string, envelope string, commitMsg string, rev string, force bool) error
- func (p *Pvr) Put(uri string, force bool) error
- func (p *Pvr) PutLocal(repoPath string) error
- func (p *Pvr) PutObjects(uri string, force bool) error
- func (p *Pvr) PutRemote(repoPath *url.URL, force bool) error
- func (p *Pvr) RemoteCopy(pvrSrc string, pvrDest string, merge bool, envelope string, commitMsg string, ...) error
- func (p *Pvr) RemoteInfo(pvrRef string) (*pvrapi.PvrRemote, error)
- func (p *Pvr) RemoveApplication(appname string) error
- func (p *Pvr) Reset(canonicalJson bool) error
- func (p *Pvr) ResetWithHardlink() error
- func (p *Pvr) ResetWithState(state *PvrMap) error
- func (p *Pvr) RunAsRoot() error
- func (p *Pvr) SaveConfig() error
- func (pvr *Pvr) SetConfiguration(arguments []string) (*PvrGlobalConfig, error)
- func (p *Pvr) SetSourceTypeFromManifest(app *AppData, options *models.GetSTOptions) error
- func (p *Pvr) Status() (*PvrStatus, error)
- func (p *Pvr) String() string
- func (p *Pvr) UnpackRepo(repoPath, outDir string, options []string) error
- func (p *Pvr) UpdateApplication(app AppData) error
- func (pvr *Pvr) UpdatePvr(username, password string, silent, force bool) error
- func (p *Pvr) Verify(keyPath string) error
- type PvrAuthConfig
- type PvrAuthTarget
- type PvrAuthTokens
- type PvrConfig
- type PvrFileAddInfo
- type PvrGlobalConfig
- type PvrIndex
- type PvrMap
- type PvrSource
- type PvrStatus
- type PvsCertPool
- type PvsMatch
- type PvsOptions
- type PvsPartSelection
- type RootFsBudget
- type RootFsSource
- type Session
- func (s *Session) AcceptDeviceOwnership(baseURL string, deviceNick string, ownerNick string) (*DeviceOwnershipStatus, error)
- func (s *Session) CreateDevice(baseURL string, deviceNick string) (*resty.Response, error)
- func (s *Session) DoAuthCall(withAnonToken bool, method CallMethod, fn WrappableRestyCallFunc) (*resty.Response, error)
- func (p *Session) DoLogs(baseurl string, deviceIds []string, rev string, startTime *time.Time, ...) (logEntries []*logs.Entry, cursorID string, err error)
- func (p *Session) DoLogsCursor(baseurl string, cursor string) (logEntries []*logs.Entry, cursorID string, err error)
- func (p *Session) DoPs(baseurl string) ([]PantahubDevice, error)
- func (s *Session) GetApp() *cli.App
- func (s *Session) GetAuthStatus(baseURL string) (*resty.Response, error)
- func (s *Session) GetConfigDir() string
- func (s *Session) GetDevice(baseURL string, deviceNick string, ownerNick string) (*resty.Response, error)
- func (s *Session) GetDevices(baseURL string, ownerNick string, deviceNick string) (*resty.Response, error)
- func (s *Session) GetUserProfiles(baseURL string, userNick string) (*resty.Response, error)
- func (s *Session) GetWhoami() (nick string, err error)
- func (session *Session) IsUserLoggedIn(baseURL string) (bool, error)
- func (s *Session) Login(APIURL string, interactiveOnly bool, oauth bool, netrc bool) (*resty.Response, error)
- func (s *Session) SuggestDeviceNicks(userNick, searchTerm string, baseURL string)
- func (s *Session) SuggestNicks(searchTerm string, baseURL string)
- func (s *Session) SuggestUserNicks(searchTerm string, baseURL string)
- func (p *Session) TokenCreate(baseurl string, usermeta map[string]interface{}) (*PantahubDevicesJoinToken, error)
- func (p *Session) TokenDisable(baseurl string, id string) (*PantahubDevicesJoinToken, error)
- func (p *Session) TokenLs(baseurl string) ([]PantahubDevicesJoinToken, error)
- func (s *Session) UpdateDevice(baseURL string, deviceNick string, data map[string]interface{}, ...) (*resty.Response, error)
- func (s *Session) Whoami() (err error)
- type SignedParts
- type Source
- type TreeDiff
- type WrappableRestyCallFunc
Examples ¶
Constants ¶
const ( SRC_FILE = "src.json" PVPKG_FILE = "pvpkg.json" SRC_SPEC = "service-manifest-src@1" TEMPLATE_BUILTIN_LXC_DOCKER = "builtin-lxc-docker" )
const ( MAKE_SQUASHFS_CMD = "mksquashfs" SQUASH_FILE = "root.squashfs" SQUASH_OVL_FILE = "root.ovl.squashfs" DOCKER_DIGEST_SUFFIX = ".docker-digest" ROOTFS_DIGEST_SUFFIX = ".rootfs-digest" DOCKER_DOMAIN = "docker.io" DOCKER_DOMAIN_URL = "https://" + DOCKER_DOMAIN DOCKER_REGISTRY = "https://index.docker.io/v1/" DOCKER_REGISTRY_SERVER_ADDRESS = "https://registry-1.docker.io" )
const ( // PhTrailsEp constant defining pantahub /trails PhTrailsEp = "/trails" // PhTrailsSummaryEp constant defines pantahub /trails/summary EP PhTrailsSummaryEp = PhTrailsEp + "/summary" // PhAccountsEp constant defines pantahub /accounts endpoint PhAccountsEp = "/auth/accounts" // PhLogsEp constant defining pantahub /logs/ PhLogsEp = "/logs/" // PhLogsEpCursor constant defines path to /logs/cursor PhLogsEpCursor = PhLogsEp + "cursor" // PhDeviceTokens constant defines path to /devices/tokens PhDeviceTokens = "/devices/tokens" )
const ( SigKeyFilename = "key.default.pem" SigX5cFilename = "x5c.default.pem" SigCacertFilename = "cacerts.default.pem" )
const ( CHMOD_CMD = "chmod" CP_CMD = "cp" LN_CMD = "ln" MKDIR_CMD = "mkdir" MKNOD_CMD = "mknod" MKTEMP_CMD = "mktemp" RM_CMD = "rm" TAR_CMD = "tar" TOUCH_CMD = "touch" )
const (
ConfigurationFile = "config.json"
)
const (
DmVolumes = "_dm"
)
const (
PoolSize = 5
)
const (
PvrCheckpointFilename = "checkpoint.json"
)
Variables ¶
var ( ErrInvalidVolumeFormat = errors.New("invalid volume format") ErrEmptyAppName = errors.New("empty app name") ErrEmptyFrom = errors.New("empty from") ErrEmptyPart = errors.New("empty part on the pvr url PVR_URL#part") ErrNeedBeRoot = errors.New("please run this command as root or use fakeroot utility") )
var ( ErrMakeSquashFSNotFound = errors.New("mksquashfs not found in your PATH, please install before continue") ErrTarNotFound = errors.New("tar not found in your PATH, please install before continue") ErrImageNotFound = errors.New("image not found or you do not have access") ErrDownloadedLayerDiffSize = errors.New("size of downloaded layer is different from expected") ErrDownloadedLayerDiffSha = errors.New("sha of downloaded layer is different from expected") )
var ( MaxRootFsBytes = envInt64("PVR_MAX_ROOTFS_BYTES", 32<<30) MaxRootFsEntries = envInt64("PVR_MAX_ROOTFS_ENTRIES", 2_000_000) )
Ceilings of an image's unpacked rootfs, summed over its layers before they are unpacked: a few compressed megabytes can expand to fill a disk. PVR_MAX_ROOTFS_BYTES and PVR_MAX_ROOTFS_ENTRIES override them.
var IsDebugEnabled bool
Variable set in main() to enable/disable debug
var MaxRootFsDownloadSize = int64(8 << 30)
MaxRootFsDownloadSize bounds a downloaded rootfs so a hostile or oversized source cannot exhaust the disk of the machine that fetches it.
var (
RuntimeDefaultMetadata = map[string]interface{}{
"PVR_BASEURL": "https://api.pantahub.com",
"PVR_REPO_BASEURL": "https://pvr.pantahub.com",
"PVR_AUTH": "",
}
)
Functions ¶
func AddDockerApp ¶
func AddFragsToState ¶
func AddGitLabPkgApp ¶
AddGitLabPkgApp adds an application from a GitLab package
func AddRootFsApp ¶
func AskForConfirmation ¶
AskForConfirmation ask the user for confirmation action
func CleanPatchSignedPkg ¶
CleanPatchSignedPkg cleans the patched signed package by removing unnecessary keys and expressions. It takes in the source, patch, and target PvrMaps as parameters and returns an error if any.
Parameters: - src: The source PvrMap. - patch: The patch PvrMap. - target: The target PvrMap.
Returns: - error: An error if any occurred during the cleaning process.
func CleanRemovedSignatures ¶
CleanRemovedSignatures cleans the removed signatures in the initial state by comparing it with the final state.
Parameters: - initialState: A pointer to the initial state PvrMap. - finalState: A pointer to the final state PvrMap.
Returns: - error: An error if any occurred during the cleaning process.
func ContainSymlinks ¶
func ContainSymlinks(root string, rewritten map[string]ContainedSymlink) error
ContainSymlinks rewrites the symlinks under root whose targets would leave root on this machine (absolute targets, or ".." past root) into relative links to the place they name inside the image, as its container sees them. Extracting further layers with tar, processing whiteouts and creating directories then stay inside root. RestoreSymlinks puts the image's own targets back, so the packaged rootfs is unchanged.
func CreateFolder ¶
func CreateTrail ¶
func CreateTrail(baseURL string, deviceAccessToken string, state map[string]interface{}, ) ( *resty.Response, error, )
CreateTrail : Create Trail
func DeleteSignatureFromState ¶
func DeleteSignatureFromState(state PvrMap, stateBuf []byte, delSigKey string, delSigValue map[string]interface{}, signedParts SignedParts) ([]string, error)
DeleteSignatureFromState deletes a signature and signed files from the state and updates the signed parts accordingly.
Parameters: - state: the PVR state map. - stateBuf: the state buffer. - deletedSignature: the signature to be deleted. - signedParts: the signed parts mapping. Returns a slice of deleted parts and an error.
func DownloadFile ¶
DownloadFile fetches uri into a fresh private temporary directory and returns the path of the downloaded file. The caller owns the returned directory: it must remove it once the download is processed.
func DownloadLayersFromLocalDocker ¶
func DownloadLayersFromLocalDocker(imageRef string) (io.ReadCloser, error)
DownloadLayersFromLocalDocker : Download Layers From Local Docker using go-containerregistry
func DownloadSigningCert ¶
func DownloadSigningCertWithConfirmation ¶
DownloadSigningCertWithConfirmation ask for confirmation to download signing certs
func ExecCommand ¶
func ExpandPath ¶
func ExportLocalImage ¶
func ExportLocalImage(imageRef string) (io.ReadCloser, error)
ExportLocalImage exports a local Docker image as a tar stream
func ExtractFiles ¶
func FileHasSameSha ¶
func FilterByFrags ¶
func FindWhiteoutsFromLayer ¶
FindWhiteoutsFromLayer : Find Whiteout Files From a Layer
func FixupRepoRef ¶
Example (Ref1) ¶
uristring, _ := FixupRepoRef("192.168.1.3")
fmt.Println(uristring)
Output: http://192.168.1.3:12368/cgi-bin/pvr
Example (Ref2) ¶
uristring, _ := FixupRepoRef("192.168.1.3#hash,some")
fmt.Println(uristring)
Output: http://192.168.1.3:12368/cgi-bin/pvr#hash,some
Example (Ref3) ¶
uristring, _ := FixupRepoRef("asacasa/test1234")
fmt.Println(uristring)
Output: https://pvr.pantahub.com/asacasa/test1234
Example (Ref4) ¶
uristring, _ := FixupRepoRef("asacasa/test1234#something,fun")
fmt.Println(uristring)
Output: https://pvr.pantahub.com/asacasa/test1234#something,fun
func FormatJson ¶
func FormatJsonC ¶
func GetDockerConfigFile ¶
func GetFileContentType ¶
GetFileContentType : Get File Content Type of a file
func GetFromConfigPvs ¶
func GetFromRootFs ¶
func GetImageConfig ¶
GetImageConfig extracts the config from a v1.Image
func GetImageDigest ¶
GetImageDigest returns the digest of a v1.Image as a string
func GetPhAuthHeaderTokenKey ¶
func GetStatePatch ¶
func InstallGitLabPkgApp ¶
InstallGitLabPkgApp installs a GitLab package application
func IsFileExists ¶
IsFileExists : Check if File Exists or not
func IsLocalDeviceURL ¶
IsLocalDeviceURL checks if a URL points to a local device. Local devices are identified by the presence of /cgi-bin in the URL path, which is only present when talking directly to a Pantavisor device (via the CGI interface), not when going through the cloud API.
func IsValidUrl ¶
IsValidUrl tests a string to determine if it is a well-structured url or not.
Example (Url1) ¶
if IsValidUrl("asacasa/test") {
fmt.Println("yes")
} else {
fmt.Println("no")
}
Output: no
Example (Url2) ¶
if IsValidUrl("192.168.1.1") {
fmt.Println("yes")
} else {
fmt.Println("no")
}
Output: no
Example (Url3) ¶
if IsValidUrl("http://192.168.1.1") {
fmt.Println("yes")
} else {
fmt.Println("no")
}
Output: yes
func LoadLocalImage ¶
LoadLocalImage : To check whether Image Exist In Local Docker Or Not
func LoginDevice ¶
LoginDevice : Login Device
func MaybeUnzip ¶
MaybeUnzip checks if the given path is a zip file. If so, it extracts the inner tar/tar.gz file (which must have the same base name as the zip) to a temp file and returns its path. The caller must call MaybeUnzipCleanup with the returned tempFile path when done. For non-zip files, it returns the original path unchanged and an empty tempFile.
func MaybeUnzipCleanup ¶
func MaybeUnzipCleanup(tempFile string)
MaybeUnzipCleanup removes the temp file created by MaybeUnzip. Safe to call with an empty string (no-op).
func MergePatch ¶
func MergeSummary ¶
func MergeSummary(dest *JwsVerifySummary, merge ...JwsVerifySummary)
func OverwriteState ¶
func ParseRFC3339 ¶
ParseRFC3339 : Parse RFC3339 string : 2006-01-02T15:04:05+07:00
func PatchState ¶
func PatchState(srcBuff, patchBuff []byte, srcFrags, patchFrag string, merge bool, state *PvrMap) ([]byte, map[string]interface{}, error)
PatchState update a json with a patch
func PrintDebugf ¶
PrintDebugf forwards to Printfs if IsDebugEnabled
func PrintDebugln ¶
PrintDebugln forwards to Printfs if IsDebugEnabled
func ProcessWhiteouts ¶
ProcessWhiteouts : FInd Whiteouts from a layer and process it in a given extract path
func ReadArgsFile ¶
func ReadOrCreateFile ¶
ReadOrCreateFile read a file from file system if is not avaible creates the file
func ReadUserPasswdFromNetrc ¶
ReadUserPasswdFromNetrc reads the username and password for the given host from the .netrc file located in the current directory, falling back to $HOME/.netrc.
func RemoveDirContents ¶
func RenameFile ¶
func ReportError ¶
func ResolveDeviceEndpoint ¶
ResolveDeviceEndpoint turns a device argument into an absolute device endpoint URL. A value that already carries a scheme (a full URL) is returned unchanged. A bare value (a device id or nick) is resolved against baseURL, e.g. "abc123" with baseURL "https://api.stage.pantahub.com" becomes "https://api.stage.pantahub.com/devices/abc123".
func ResolveInImage ¶
ResolveInImage resolves the image path p (absolute, "/" being root) the way a container whose root is root does: ".." stops at "/", absolute link targets start from root, and every link along the way is followed. Parts that do not exist yet are kept as they are.
func ResolveInRoot ¶
ResolveInRoot is SafeJoin for a path that is about to be removed or written through: it also resolves the symlinks the tree already has and requires the real path to stay inside root. A missing path answers an fs.ErrNotExist error.
func RestoreSymlinks ¶
func RestoreSymlinks(rewritten map[string]ContainedSymlink) error
RestoreSymlinks gives the links ContainSymlinks rewrote their image targets back, unless a later layer replaced or removed them.
func SafeJoin ¶
SafeJoin joins relative onto root and requires the result to stay inside root. It rejects absolute paths, any ".." component, and anything that cleans out of root. It does not follow symlinks: callers that delete or write through the result must also avoid resolving symlinks.
func SetTempFilesInterrupHandler ¶
func SetTempFilesInterrupHandler(tempdir string)
SetTempFilesInterrupHandler : Set Temp Files Interrup Handler
This function will capture Interrupt signals and delete all temp files
func ShowOrOpenRegisterLink ¶
ShowOrOpenRegisterLink show or open the user the registration link
func SignatureCoverage ¶
SignatureCoverage reports which keys of state the pvs@2 signature stored under sigKey protects and which its exclude patterns leave out, selected the way a device selects them. It does not verify the signature itself.
func SliceContainsItem ¶
SliceContainsItem : checks if an item exists in a string array or not
func SortObjects ¶
func SprintTmpl ¶
Example (Basic) ¶
s, _ := SprintTmpl("Basic", testMap1)
fmt.Println(s)
Output: Basic
Example (Simple1) ¶
s, _ := SprintTmpl("Basic: {{ .key1 }}", testMap1)
fmt.Println(s)
Output: Basic: value1
Example (Sprintf1) ¶
s, _ := SprintTmpl("Basic: {{ \"test\" | sprintf \"%.3s\" }}", testMap1)
fmt.Println(s)
Output: Basic: tes
Example (Sprintf2) ¶
s, _ := SprintTmpl("Basic: {{ .key1 | sprintf \"%.3s\" }}", testMap1)
fmt.Println(s)
Output: Basic: val
Example (Struct) ¶
s, _ := SprintTmpl("Basic: {{ .Field1 | sprintf \"%.3s\" }}", testStruct1)
fmt.Println(s)
Output: Basic: Tes
func StructToMap ¶
func UpdateIfNecessary ¶
UpdateIfNecessary update pvr if is necesary but only check on time at the day
func ValidateSourceFlag ¶
ValidateSourceFlag : Validate Source Flag
func ValidateSquashfsOptions ¶
ValidateSquashfsOptions rejects format_options values that mksquashfs would turn into arbitrary command execution or host-file access. Values that only tune compression and block sizes are allowed.
func WriteConfiguration ¶
func WriteConfiguration(filePath string, config *PvrGlobalConfig) error
WriteConfiguration write ~/.pvr/config.json with new data
func WriteTxtFile ¶
Types ¶
type Account ¶
type Account struct {
Email string `json:"email" bson:"email"`
Nick string `json:"nick" bson:"nick"`
Password string `json:"password,omitempty" bson:"password"`
}
Account data model
type ApiError ¶
func LogPrettyJSON ¶
LogPrettyJSON : Pretty print Json content
type AppData ¶
type AppData struct {
SquashFile string
Appname string
DockerURL string
Username string
Password string
Appmanifest *Source
TemplateArgs map[string]interface{}
Config map[string]interface{}
DestinationPath string
LocalImage DockerImage
RemoteImage DockerImage
From string
Source string
Platform string
ConfigFile string
Volumes []string
FormatOptions string
SourceType string
DoOverlay bool
Base string
ManifestType string
ForceAdd bool
}
AppData : To hold all required App Information
func (*AppData) GetPlatform ¶
type AsyncBody ¶
type AsyncBody struct {
Delegate io.ReadCloser
// contains filtered or unexported fields
}
type CLIInitResponse ¶
type CallMethod ¶
type CallMethod int
const ( InteractiveCallMethod CallMethod = iota OAuthCallMethod NetrcCallMethod NoneCallMethod )
type ContainedSymlink ¶
ContainedSymlink is a symlink of an image rootfs that ContainSymlinks rewrote: what the image says, and what pvr points it to meanwhile.
type Descriptor ¶
type Descriptor struct {
MediaType string `json:"mediaType,omitempty"`
Size int64 `json:"size"`
Digest string `json:"digest"`
}
Descriptor represents a content descriptor
type DeviceOwnershipStatus ¶
type DeviceOwnershipStatus struct {
Mode string `json:"mode,omitempty"`
Status string `json:"status,omitempty"`
}
DeviceOwnershipStatus is the owner-verification state hub reports for a device that was onboarded through a device token with an ovmode.
type DmVerityJson ¶
type DockerImage ¶
type DockerImage struct {
Exists bool
DockerDigest string
DockerConfig map[string]interface{}
DockerManifest *Manifest
ImageRef name.Reference
ImagePath string
DockerPlatform string
}
DockerImage : return type of ImageExistsInLocalDocker()
type DockerManifest ¶
type DockerManifest map[string]interface{}
type DockerSource ¶
type DockerSource struct {
DockerName string `json:"docker_name,omitempty"`
DockerTag string `json:"docker_tag,omitempty"`
DockerDigest string `json:"docker_digest,omitempty"`
DockerOvlDigest string `json:"docker_ovl_digest,omitempty"`
DockerSource string `json:"docker_source,omitempty"`
DockerConfig map[string]interface{} `json:"docker_config,omitempty"`
DockerPlatform string `json:"docker_platform,omitempty"`
FormatOptions string `json:"format_options,omitempty"`
}
type EncryptedAccountData ¶
type EncryptedAccountData struct {
Token string `json:"token"`
RedirectURI string `json:"redirect-uri"`
}
EncryptedAccountData Encrypted account response
func GetEncryptedAccount ¶
func GetEncryptedAccount(authEp, email, username, password string) (*EncryptedAccountData, error)
GetEncryptedAccount encrypt account data in order to open the browser to finish the registration process
type GetAccesstokenMethod ¶
type GetAccesstokenMethod int
const ( CachedAccessTokenMethod GetAccesstokenMethod = iota RefreshTokenMethod UserPassMethod AnonTokenMethod InteractiveMethod OAuthMethod NetrcMethod )
type GitLabPackage ¶
type GitLabPackage struct {
ProjectPath string
ID int `json:"id"`
Name string `json:"name"`
Version string `json:"version"`
PackageType string `json:"package_type"`
Status string `json:"status"`
Files []GitLabPackageFile `json:"package_files"`
}
GitLabPackage represents a GitLab package from the API
type GitLabPackageFile ¶
type GitLabPackageFile struct {
ARCH string
ID int `json:"id"`
FileName string `json:"file_name"`
Size int `json:"size"`
FileURL string `json:"file_url"`
FileSHA256 string `json:"file_sha256"`
}
GitLabPackageFile represents a file within a GitLab package
type GitLabPkgSource ¶
type JwsVerifySummary ¶
type LogFormatter ¶
type LogFormatterJson ¶
type LogFormatterJson struct{}
func (*LogFormatterJson) Init ¶
func (s *LogFormatterJson) Init(format string) error
type LogFormatterTemplate ¶
type LogFormatterTemplate struct {
// contains filtered or unexported fields
}
func (*LogFormatterTemplate) Init ¶
func (s *LogFormatterTemplate) Init(template string) error
type Manifest ¶
type Manifest struct {
SchemaVersion int `json:"schemaVersion"`
MediaType string `json:"mediaType,omitempty"`
Config Descriptor `json:"config"`
Layers []Descriptor `json:"layers"`
Annotations map[string]string `json:"annotations,omitempty"`
}
Manifest represents a Docker/OCI image manifest
type ObjectWithAccess ¶
type PVZeroConf ¶
type PVZeroConf struct {
Hostname string
AddrIPv4 []net.IP
AddrIPv6 []net.IP
Port int
Pantahub string
DeviceId string
Challenge string
}
func (PVZeroConf) ClaimCmd ¶
func (p PVZeroConf) ClaimCmd() string
func (PVZeroConf) String ¶
func (p PVZeroConf) String() string
type PantahubDevice ¶
type PantahubDevice struct {
Id string `json:"deviceid"`
Prn string `json:"device"`
Nick string `json:"device-nick"`
Revision int `json:"revision"`
ProgressRevision int `json:"progress-revision"`
RealIP string `json:"real-ip"`
Timestamp time.Time `json:"timestamp"`
StateSha string `json:"state-sha"`
Status string `json:"status"`
StatusMsg string `json:"status-msg"`
}
type PantahubDevicesJoinToken ¶
type PantahubDevicesJoinToken struct {
ID string `json:"id"`
Prn string `json:"prn"`
Nick string `json:"nick"`
Owner string `json:"owner"`
Token string `json:"token,omitempty"`
TokenSha []byte `json:"token-sha,omitempty"`
DefaultUserMeta map[string]interface{} `json:"default-user-meta"`
Disabled bool `json:"disabled"`
TimeCreated time.Time `json:"time-created"`
TimeModified time.Time `json:"time-modified"`
}
type PkceResponse ¶
type PkceResponse struct {
Token string `json:"token"`
ExpiresIn int64 `json:"expires_in"`
Type string `json:"token_type"`
}
func (*PkceResponse) Body ¶
func (r *PkceResponse) Body() []byte
type PollTokenResponse ¶
type Pvr ¶
type Pvr struct {
Initialized bool
Dir string
Pvrdir string
Pvdir string
Objdir string
Pvrconfig PvrConfig
PristineJson []byte
PristineJsonMap PvrMap
NewFiles PvrIndex
Session *Session
Platform string
}
func (*Pvr) AddApplication ¶
AddApplication : Add application from several types of sources
func (*Pvr) AuthConfig ¶
func (p *Pvr) AuthConfig(username, password, registry string) authn.Authenticator
AuthConfig returns an authenticator for registry access
func (*Pvr) CheckIfIsRunningAsRoot ¶
func (*Pvr) DeployPvLinks ¶
DeployPvLinks sets up the hardlinks for the .pv/ files
func (*Pvr) DmCVerityApply ¶
func (*Pvr) DmCVerityConvert ¶
func (*Pvr) DmCryptApply ¶
func (*Pvr) Export ¶
Export will put the 'json' file first into the archive to allow for stream parsing and validation of json before processing objects
func (*Pvr) FindDockerImage ¶
FindDockerImage : Find Docker Image
func (*Pvr) GenerateApplicationSquashFS ¶
func (*Pvr) GenerateApplicationTemplateFiles ¶
func (*Pvr) GetAppDockerDigest ¶
GetAppDockerDigest : Get App Docker Digest
func (*Pvr) GetAppDockerName ¶
GetAppDockerName : Get App Docker Name
func (*Pvr) GetApplicationInfo ¶
GetApplicationInfo : Get Application Info
func (*Pvr) GetApplicationManifest ¶
func (*Pvr) GetApplications ¶
ListApplications : List Applications
func (*Pvr) GetCPristineJson ¶
func (*Pvr) GetDefaultGroup ¶
func (*Pvr) GetGitlabPackage ¶
func (*Pvr) GetRemoteImage ¶
GetRemoteImage fetches a remote image using go-containerregistry
func (*Pvr) GetRemoteImageForPlatform ¶
func (p *Pvr) GetRemoteImageForPlatform(imageRef string, platform v1.Platform, auth authn.Authenticator) (v1.Image, error)
GetRemoteImageForPlatform fetches a remote image for a specific platform
func (*Pvr) GetRemoteIndex ¶
func (p *Pvr) GetRemoteIndex(imageRef string, auth authn.Authenticator) (v1.ImageIndex, error)
GetRemoteIndex fetches a remote multi-platform image index
func (*Pvr) GetRepoLocal ¶
func (*Pvr) GetRepoRemote ¶
func (*Pvr) GetSquashFSDigest ¶
func (*Pvr) GetStateJson ¶
func (*Pvr) GetTrackURL ¶
GetTrackURL : Get Track URL
func (*Pvr) GetWorkingGroupsJson ¶
func (*Pvr) GetWorkingJson ¶
create the canonical json for the working directory
func (*Pvr) GetWorkingJsonMap ¶
func (*Pvr) InstallApplication ¶
InstallApplication : Install Application from any type of source
func (*Pvr) JwsSign ¶
JwsSign will add or update a signature based using a private key provided.
The payload will be assembled from the prinstine system state JSON using the match rule provided in PvsMatch struct.
PvsOptions allow to pass additional JoseHeader options to include in the Signature.
func (*Pvr) JwsSignAuto ¶
func (p *Pvr) JwsSignAuto(keyPath string, part string, options *PvsOptions) error
func (*Pvr) JwsSignPvs ¶
func (p *Pvr) JwsSignPvs(privKeyPath string, pvsPath string, options *PvsOptions) error
JwsSignPvs will parse a pvs@s json provided as argument and use the included PvsMatch section to invoke JwsSign
func (*Pvr) JwsVerifyPvs ¶
func (p *Pvr) JwsVerifyPvs(keyPath string, caCerts string, pvsPath string, includePayload bool) (*JwsVerifySummary, error)
JwsVerify will add or update a signature based using a private key provided.
The payload will be assembled from the prinstine system state JSON using the match rule provided in PvsMatch struct included in the pvs.
special value for caCerts "_system_" hints at using the system cacert store. Can be configured using SSH_CERT_FILE and SSH_CERTS_DIR on linux
func (*Pvr) ListApplications ¶
ListApplications : List Applications
func (*Pvr) LoadRemoteImage ¶
LoadRemoteImage : To check whether Image Exist In Remote Docker Or Not
func (*Pvr) MergeAppSrcArgs ¶
func (p *Pvr) MergeAppSrcArgs(appname string, args map[string]interface{}, config map[string]interface{}, unsetArgs []string, unsetConfig []string) error
MergeAppSrcArgs merges the given template args and config values into the application's src.json and persists the result. Existing keys are overwritten; keys that are not provided are left untouched. The unsetArgs and unsetConfig keys are removed afterwards (so unset wins over set within a single call), which is the only way to fully drop a key back to its template default. It is a no-op when nothing is provided. This is used by app update/install to inject --arg/--config (and --unset-arg/--unset-config) into src.json before running the normal regeneration logic.
func (*Pvr) Post ¶
make a json post to a REST endpoint. You can provide metainfo etc. in post argument as json. postKey if set will be used as key that refers to the posted json. Example usage: json blog post, json revision repo with commit message etc
func (*Pvr) RemoteCopy ¶
func (p *Pvr) RemoteCopy(pvrSrc string, pvrDest string, merge bool, envelope string, commitMsg string, rev string, force bool) error
RemoteCopy will perform a remote only copy by taking the json, select elements that have the #fragement of a provided url as Prefix of their key and replace all elements in pvrDest that match that prefix. The target prefix can be overloaded through providing a #fragment in destination URL as well. It is an illegal input if pvrSrc has no fragement, but pvrDest has one. It is however legal input if pvrSrc has a fragement, but pvrDest does not have one. In that case the same fragement is implicitely appended to pvrDest
func (*Pvr) RemoveApplication ¶
RemoveApplication : Remove Application
func (*Pvr) ResetWithHardlink ¶
func (*Pvr) ResetWithState ¶
func (*Pvr) SaveConfig ¶
func (*Pvr) SetConfiguration ¶
func (pvr *Pvr) SetConfiguration(arguments []string) (*PvrGlobalConfig, error)
SetConfiguration read arguments and write new configuration, merging with the previous configuration on the file
func (*Pvr) SetSourceTypeFromManifest ¶
func (p *Pvr) SetSourceTypeFromManifest(app *AppData, options *models.GetSTOptions) error
func (*Pvr) UpdateApplication ¶
UpdateApplication : Update any application and any type
type PvrAuthConfig ¶
type PvrAuthConfig struct {
Spec string `json:"spec"`
Tokens map[string]PvrAuthTokens `json:"tokens"`
User string `json:"-"`
Password string `json:"-"`
// contains filtered or unexported fields
}
func LoadConfig ¶
func LoadConfig(filePath string) (*PvrAuthConfig, error)
func (*PvrAuthConfig) DoRefresh ¶
func (p *PvrAuthConfig) DoRefresh(authEp, token string) (string, string, error)
func (*PvrAuthConfig) Save ¶
func (p *PvrAuthConfig) Save() error
type PvrAuthTarget ¶
type PvrAuthTokens ¶
type PvrFileAddInfo ¶
type PvrGlobalConfig ¶
type PvrGlobalConfig struct {
Spec string `json:"Spec"`
AutoUpgrade bool `json:"AutoUpgrade"`
DistributionTag string `json:"DistributionTag"`
}
PvrGlobalConfig define all the posible general configuration for pvr
func LoadConfiguration ¶
func LoadConfiguration(filePath string) (*PvrGlobalConfig, error)
LoadConfiguration read configuration from ~/.pvr/config.json or return default configuration
type PvrIndex ¶
type PvrIndex map[string]PvrFileAddInfo
type PvrStatus ¶
type PvsCertPool ¶
type PvsCertPool struct {
// contains filtered or unexported fields
}
func NewPvsCertPool ¶
func NewPvsCertPool() *PvsCertPool
func (*PvsCertPool) AppendCertsFromPEM ¶
func (s *PvsCertPool) AppendCertsFromPEM(pemCerts []byte) (ok bool)
func (*PvsCertPool) GetCertsRaw ¶
func (s *PvsCertPool) GetCertsRaw() [][]byte
type PvsOptions ¶
type PvsPartSelection ¶
type RootFsBudget ¶
type RootFsBudget struct {
Bytes, Entries int64
}
RootFsBudget adds up the layers of an image as they are unpacked.
func (*RootFsBudget) Add ¶
func (b *RootFsBudget) Add(layerPath string) error
Add reads the headers of layerPath (tar, or gzip-compressed tar) and refuses the layer once the image's unpacked size or entry count passes its ceiling.
type RootFsSource ¶
type Session ¶
type Session struct {
Configuration *PvrGlobalConfig
// contains filtered or unexported fields
}
func DefaultSession ¶
func DefaultSession() *Session
func (*Session) AcceptDeviceOwnership ¶
func (s *Session) AcceptDeviceOwnership(baseURL string, deviceNick string, ownerNick string, ) (*DeviceOwnershipStatus, error)
AcceptDeviceOwnership completes the manual owner-verification step for a device: it resolves NICK|ID (optionally scoped by ownerNick) to the device id and POSTs /devices/{id}/ownership/validate with the logged-in user.
func (*Session) CreateDevice ¶
CreateDevice : Create Device
func (*Session) DoAuthCall ¶
func (s *Session) DoAuthCall(withAnonToken bool, method CallMethod, fn WrappableRestyCallFunc) (*resty.Response, error)
func (*Session) DoLogsCursor ¶
func (*Session) GetAuthStatus ¶
GetAuthStatus : Get Auth Status, GET /auth/auth_status
func (*Session) GetConfigDir ¶
func (*Session) GetDevice ¶
func (s *Session) GetDevice(baseURL string, deviceNick string, ownerNick string, ) ( *resty.Response, error, )
GetDevice : Get Device
func (*Session) GetDevices ¶
func (s *Session) GetDevices(baseURL string, ownerNick string, deviceNick string, ) ( *resty.Response, error, )
GetDevices : Get Devices
func (*Session) GetUserProfiles ¶
GetUserProfiles : Get User Profiles
func (*Session) IsUserLoggedIn ¶
IsUserLoggedIn : To check if a user is logged in or not
func (*Session) Login ¶
func (s *Session) Login(APIURL string, interactiveOnly bool, oauth bool, netrc bool) (*resty.Response, error)
Login : Login to a given URL
func (*Session) SuggestDeviceNicks ¶
SuggestDeviceNicks : Suggest Device Nicks
func (*Session) SuggestNicks ¶
SuggestNicks : Suggest Nicks (Either user nicks or device nicks)
func (*Session) SuggestUserNicks ¶
SuggestUserNicks : Suggest User Nicks
func (*Session) TokenCreate ¶
func (p *Session) TokenCreate(baseurl string, usermeta map[string]interface{}) (*PantahubDevicesJoinToken, error)
func (*Session) TokenDisable ¶
func (p *Session) TokenDisable(baseurl string, id string) (*PantahubDevicesJoinToken, error)
func (*Session) TokenLs ¶
func (p *Session) TokenLs(baseurl string) ([]PantahubDevicesJoinToken, error)
type SignedParts ¶
type Source ¶
type Source struct {
Base string `json:"base,omitempty"`
Name string `json:"name,omitempty"`
Spec string `json:"#spec"`
Template string `json:"template,omitempty"`
TemplateArgs map[string]interface{} `json:"args,omitempty"`
DmEnabled map[string]bool `json:"dm_enabled,omitempty"`
Logs []map[string]interface{} `json:"logs,omitempty"`
Exports []string `json:"exports,omitempty"`
Config map[string]interface{} `json:"config,omitempty"`
DockerSource
PvrSource
RootFsSource
GitLabPkgSource
Persistence map[string]string `json:"persistence,omitempty"`
}
type TreeDiff ¶
type TreeDiff struct {
A string
B string
Errors []error
InA []string
InB []string
OnlyInA []string
OnlyInB []string
Differ []string
}
func MkTreeDiff ¶
type WrappableRestyCallFunc ¶
WrappableRestyCallFunc prepares a resty request (sets URL, Method, Body, etc.) DoAuthCall will handle authentication and execute the request