mobileconfig

package module
v0.0.0-...-7ea9927 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2016 License: MIT Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

go-apple-mobileconfig

GoDoc

Create Apple mobileconfig configuration files.

Based on Node mobileconfig module.

Usage

package main

import (
	"os"
	"github.com/ProtonMail/go-apple-mobileconfig"
)

func main() {
	c := &mobileconfig.Config{
		DisplayName: "Mail Account",
		EmailAddress: "root@nsa.gov",
		Identifier: "gov.nsa.mail",
		Organization: "NSA",
		Imap: &mobileconfig.Imap{
			Hostname: "mail.nsa.gov",
			Port: 993,
			Tls: true,
			Username: "root",
			Password: "snowden",
		},
		Smtp: &mobileconfig.Smtp{
			Hostname: "mail.nsa.gov",
			Port: 25,
			Tls: false,
			Username: "root",
		},
	}

	if err := c.WriteTo(os.Stdout); err != nil {
		panic(err)
	}
}

License

MIT

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	EmailAddress       string
	DisplayName        string
	Identifier         string
	Organization       string
	AccountDescription string

	Imap *Imap
	Smtp *Smtp

	Description string
	ContentUuid string
	Uuid        string
}

An Apple mobileconfig file.

func (*Config) WriteTo

func (c *Config) WriteTo(w io.Writer) error

type Imap

type Imap struct {
	Hostname string
	Port     int
	Tls      bool

	Username string
	Password string
}

type Smtp

type Smtp struct {
	Hostname string
	Port     int
	Tls      bool

	// Leave Username blank to do not use SMTP authentication.
	Username string
	// Leave Password blank to use IMAP credentials.
	Password string
}

Jump to

Keyboard shortcuts

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