Documentation
¶
Index ¶
- Variables
- func BodyToBytes(DataStruct interface{}) []byte
- func DecodeUint16(num []byte) uint16
- func DecodeUint32(num []byte) uint32
- func DecodeUint8(num []byte) uint8
- func EncodeNum(v interface{}) []byte
- func FromUnicode(uni []byte) string
- func Hash(s string) uint32
- func Init(traceHandle io.Writer, infoHandle io.Writer, warningHandle io.Writer, ...)
- func Obfuscate(data []byte) []byte
- func ReadASCIIString(pos int, buff []byte) ([]byte, int)
- func ReadByte(pos int, buff []byte) (byte, int)
- func ReadBytes(pos, count int, buff []byte) ([]byte, int)
- func ReadTypedString(pos int, buff []byte) ([]byte, int)
- func ReadUint16(pos int, buff []byte) (uint16, int)
- func ReadUint32(pos int, buff []byte) (uint32, int)
- func ReadUint8(pos int, buff []byte) (uint8, int)
- func ReadUnicodeString(pos int, buff []byte) ([]byte, int)
- func UTF16BE(str string, trail int) []byte
- func UniString(str string) []byte
- type Account
- type AddressBook
- type AutoError
- type AutodiscoverResp
- type Config
- type MailStore
- type ProtoInternal
- type Protocol
- type PublicFolderInformation
- type Response
- type Session
- type User
Constants ¶
This section is empty.
Variables ¶
var ( Trace *log.Logger Info *log.Logger Question *log.Logger Fail *log.Logger Warning *log.Logger Error *log.Logger Clear *log.Logger )
var ( //EncBase64 wrapper for encoding to base64 EncBase64 = base64.StdEncoding.EncodeToString //DecBase64 wrapper for decoding from base64 DecBase64 = base64.StdEncoding.DecodeString )
Functions ¶
func DecodeUint16 ¶
DecodeUint16 decode 2 byte value into uint16
func DecodeUint32 ¶
DecodeUint32 decode 4 byte value into uint32
func FromUnicode ¶
FromUnicode read unicode and convert to byte array
func Init ¶
func Init( traceHandle io.Writer, infoHandle io.Writer, warningHandle io.Writer, errorHandle io.Writer)
Init the logging function
func ReadASCIIString ¶
ReadASCIIString returns a string as ascii
func ReadTypedString ¶
ReadTypedString reads a string as either Unicode or ASCII depending on type value
func ReadUint16 ¶
ReadUint16 read 2 bytes and return as uint16
func ReadUint32 ¶
ReadUint32 read 4 bytes and return as uint32
func ReadUnicodeString ¶
ReadUnicodeString read and return a unicode string
Types ¶
type Account ¶
type Account struct {
AccountType string
Action string
RedirectAddr string
MicrosoftOnline bool
Protocol []*Protocol
}
Account structure for unmarshal
type AddressBook ¶
AddressBook structure for unmarshal
type AutodiscoverResp ¶
type AutodiscoverResp struct {
Response Response
}
AutodiscoverResp structure for unmarshal
func (*AutodiscoverResp) Unmarshal ¶
func (autodiscresp *AutodiscoverResp) Unmarshal(resp []byte) error
Unmarshal returns the XML response as golang structs
type Config ¶
type Config struct {
Domain string
User string
Pass string
Email string
Basic bool
Insecure bool
Verbose bool
Admin bool
}
Config containing the session variables
type ProtoInternal ¶
ProtoInternal strucuture for unmarshal
type Protocol ¶
type Protocol struct {
Type string
TypeAttr string `xml:"Type,attr"`
Server string
TTL string
ServerDN string
ServerVersion string
MdbDN string
PublicFolderServer string
Port string
DirectoryPort string
ReferralPort string
ASUrl string
EWSUrl string
EMWSUrl string
SharingURL string
ECPUrl string
OOFUrl string
UMUrl string
OABUrl string
EwsPartnerURL string
LoginName string
DomainRequired string
DomainName string
SPA string
AuthPackage string
CertPrincipleName string
SSL string
AuthRequired string
UsePOPAuth string
SMTPLast string
NetworkRequirements string
MailStore *MailStore
AddressBook *AddressBook
Internal *ProtoInternal
External *ProtoInternal
PublicFolderInformation *PublicFolderInformation
}
Protocol structure for unmarshal
type PublicFolderInformation ¶
type PublicFolderInformation struct {
SMTPAddress string
}
PublicFolderInformation structure for unmarshal
type Session ¶
type Session struct {
User string
Pass string
Email string
Domain string
Basic bool
Insecure bool
Verbose bool
Admin bool
LID string
URL *url.URL
ABKURL *url.URL //URL for the AddressBook Provider
Host string //used for TCP
ReqCounter int
Transport int
CookieJar *cookiejar.Jar
Client http.Client
ClientSet bool
LogonID byte
Authenticated bool
Folderids [][]byte
RulesHandle []byte
NTHash []byte
NTLMAuth string
BasicAuth string
RPCSet bool
ContextHandle []byte //16-byte cookie for the RPC session
RPCURL string
UserDN []byte
Trigger string
RPCMailbox string
RPCEncrypt bool
RPCNetworkAuthLevel uint8
RPCNetworkAuthType uint8
RPCNtlmSessionKey []byte
}
Session stores authentication cookies ect