profile

package
v0.0.0-...-e633676 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ModeResponseJSON

type ModeResponseJSON []struct {
	DeviceID []string `json:"deviceId"`
	Result   string   `json:"result"`
	Status   string   `json:"status"`
	Ok       bool     `json:"ok"`
}

ModeResponseJSON profile is used for query result returning data

type Profile

type Profile struct{}

Profile is

func (Profile) GetProfile

func (p Profile) GetProfile(setProfileName string) ResponseProfileJSON

GetProfile retrieves a profile name and returns that profile information.

func (Profile) GetProfileInPolicyList

func (p Profile) GetProfileInPolicyList(setProfileCode string) ResponseGetProfileInPolicyListJSON

GetProfileInPolicyList is

func (Profile) GetProfileList

func (p Profile) GetProfileList() ResponseProfileListJSON

GetProfileList lists all the profiles that are registered.

func (Profile) GetSelectProfileInPolicyCode

func (p Profile) GetSelectProfileInPolicyCode(setProfileName string, setPolicyName string) (profileCode string, policyCode string)

GetSelectProfileInPolicyCode is

func (Profile) PushMode

func (p Profile) PushMode(workingset string, setMode string, setPolicy string) string

PushMode takes workingset key, mode key policy key and performs mode sending to specified devices

func (Profile) PushModeAuto

func (p Profile) PushModeAuto(setMode string, setPolicy string, devicesID ...string) string

PushModeAuto takes a mode key, a policy key, and retrieves a device list. send profile to specified devices in specified settings

type PushProfileJSON

type PushProfileJSON struct {
	DefaultPolicy struct {
		Code string `json:"code"`
	} `json:"defaultPolicy"`
}

PushProfileJSON is used for the body part in the profile submission query

type ResponseGetProfileInPolicyListJSON

type ResponseGetProfileInPolicyListJSON []struct {
	Code          string `json:"code"`
	Type          string `json:"type"`
	Desc          string `json:"desc"`
	PolicyProfile struct {
		Name      string        `json:"name"`
		Bookmarks []interface{} `json:"bookmarks"`
		Settings  []struct {
			Name  string `json:"name"`
			Value string `json:"value"`
		} `json:"settings"`
		ApplicationPolicies []struct {
			PackageName        string        `json:"packageName"`
			PackageBlocked     bool          `json:"packageBlocked"`
			NetworkBlocked     bool          `json:"networkBlocked"`
			ForceStopBlocked   bool          `json:"forceStopBlocked"`
			UninstallBlocked   bool          `json:"uninstallBlocked"`
			ClearDataBlocked   bool          `json:"clearDataBlocked"`
			BlockedPermissions []interface{} `json:"blockedPermissions"`
			RunBlocked         bool          `json:"runBlocked"`
			KillBlocked        bool          `json:"killBlocked"`
		} `json:"applicationPolicies"`
		ApplicationBlackPermissions []interface{} `json:"applicationBlackPermissions"`
		InstallationPolicies        struct {
			BlackList []interface{} `json:"blackList"`
			WhiteList []struct {
				PackageName string      `json:"packageName"`
				Signature   interface{} `json:"signature"`
			} `json:"whiteList"`
			TrustedStores []interface{} `json:"trustedStores"`
			RuleOrders    []interface{} `json:"ruleOrders"`
		} `json:"installationPolicies"`
		WifiApnPolicies struct {
			BlackList          []interface{} `json:"blackList"`
			WhiteList          []interface{} `json:"whiteList"`
			UnconfigurableList []interface{} `json:"unconfigurableList"`
			RuleOrders         []interface{} `json:"ruleOrders"`
		} `json:"wifiApnPolicies"`
		ApplicationShortcuts []interface{} `json:"applicationShortcuts"`
		Wificonfigs          []interface{} `json:"wificonfigs"`
		MobileApnConfigs     []interface{} `json:"mobileApnConfigs"`
		HotspotConfig        struct {
			Ssid     string `json:"ssid"`
			Password string `json:"password"`
			Security string `json:"security"`
		} `json:"hotspotConfig"`
		EcrSettings    interface{} `json:"ecrSettings"`
		PasswordPolicy interface{} `json:"passwordPolicy"`
	} `json:"policyProfile"`
	Defaults    bool        `json:"defaults"`
	CreatedDate int64       `json:"createdDate"`
	StartDate   interface{} `json:"startDate"`
	EndDate     interface{} `json:"endDate"`
	Links       []struct {
		Rel  string `json:"rel"`
		Href string `json:"href"`
	} `json:"links"`
}

ResponseGetProfileInPolicyListJSON is

type ResponseProfileJSON

type ResponseProfileJSON struct {
	Code           string `json:"code"`
	Name           string `json:"name"`
	Desc           string `json:"desc"`
	DefaultProfile bool   `json:"defaultProfile"`
	DefaultPolicy  struct {
		Code string      `json:"code"`
		Name interface{} `json:"name"`
	} `json:"defaultPolicy"`
	Configurations struct {
		EmergencySettings interface{} `json:"emergencySettings"`
		LocationSettings  interface{} `json:"locationSettings"`
		BatterySettings   interface{} `json:"batterySettings"`
		DeactivatedMode   interface{} `json:"deactivatedMode"`
		OlaSettings       interface{} `json:"olaSettings"`
	} `json:"configurations"`
	Scheduled                interface{} `json:"scheduled"`
	IsSwitchable             bool        `json:"isSwitchable"`
	IsInContainer            bool        `json:"isInContainer"`
	SwitchPassword           string      `json:"switchPassword"`
	IsBypassGoogleActivation bool        `json:"isBypassGoogleActivation"`
	IsEmpoweredMode          bool        `json:"isEmpoweredMode"`
	ActivationCode           string      `json:"activationCode"`
	Links                    []struct {
		Rel  string `json:"rel"`
		Href string `json:"href"`
	} `json:"links"`
}

ResponseProfileJSON includes the return a values when performing the profile query

type ResponseProfileJSONArray

type ResponseProfileJSONArray []struct {
	Code           string `json:"code"`
	Name           string `json:"name"`
	Desc           string `json:"desc"`
	DefaultProfile bool   `json:"defaultProfile"`
	DefaultPolicy  struct {
		Code string      `json:"code"`
		Name interface{} `json:"name"`
	} `json:"defaultPolicy"`
	Configurations struct {
		EmergencySettings interface{} `json:"emergencySettings"`
		LocationSettings  interface{} `json:"locationSettings"`
		BatterySettings   interface{} `json:"batterySettings"`
		DeactivatedMode   interface{} `json:"deactivatedMode"`
		OlaSettings       interface{} `json:"olaSettings"`
	} `json:"configurations"`
	Scheduled                interface{} `json:"scheduled"`
	IsSwitchable             bool        `json:"isSwitchable"`
	IsInContainer            bool        `json:"isInContainer"`
	SwitchPassword           string      `json:"switchPassword"`
	IsBypassGoogleActivation bool        `json:"isBypassGoogleActivation"`
	IsEmpoweredMode          bool        `json:"isEmpoweredMode"`
	ActivationCode           string      `json:"activationCode"`
	Links                    []struct {
		Rel  string `json:"rel"`
		Href string `json:"href"`
	} `json:"links"`
}

ResponseProfileJSONArray includes the return values when performing the profile query

type ResponseProfileListJSON

type ResponseProfileListJSON struct {
	Code        string      `json:"code"`
	SubCode     interface{} `json:"subCode"`
	Status      string      `json:"status"`
	Result      interface{} `json:"result"`
	Message     interface{} `json:"message"`
	Exception   interface{} `json:"exception"`
	Description interface{} `json:"description"`
	Success     string      `json:"success"`
	Error       interface{} `json:"error"`
	Extras      struct {
		Profiles []struct {
			ID             string `json:"id"`
			Name           string `json:"name"`
			DefaultProfile bool   `json:"defaultProfile"`
			DefaultPolicy  string `json:"defaultPolicy"`
			Policies       []struct {
				ID   string `json:"id"`
				Name string `json:"name"`
			} `json:"policies"`
		} `json:"profiles"`
	} `json:"extras"`
	Ok   bool `json:"ok"`
	Sent bool `json:"sent"`
}

ResponseProfileListJSON gives a list of all existing profiles

Jump to

Keyboard shortcuts

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