gomirth

package module
v0.0.0-...-ff48b3a Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2022 License: MIT Imports: 10 Imported by: 0

README

go-mirth

Austin Notes

  • Server Configuration - /server/about need to think about how to represent this as a struct and how to get the data into it.
  • Server Configuration - _testEmail I need to figure out "what" to send here
  • Usage Data - have never used this and not sure how to call it yet
  • /server/configuration - need to work out that gigantic struct
  • /server/licenseInfo - pull full example from work w/ extensions
  • Channel Deployment - have not implemented channels/_deploy & channels/_undeploy yet because those error on every Mirth 3.8.0 instance I have access to.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Api

func Api(host string, port int, baseUrl string, ignoreCert bool) api

Types

type Alert

type Alert struct {
	XMLName     struct{}         `xml:"alertModel"`
	Id          string           `xml:"id"`
	Name        string           `xml:"name"`
	Enabled     bool             `xml:"enabled"`
	Trigger     AlertTrigger     `xml:"trigger"`
	ActionGroup AlertActionGroup `xml:"actionGroups>alertActionGroup"`
}

type AlertAction

type AlertAction struct {
	Protocol  string `xml:"protocol"`
	Recipient string `xml:"recipient"`
}

type AlertActionGroup

type AlertActionGroup struct {
	Subject  string        `xml:"subject"`
	Template string        `xml:"template"`
	Actions  []AlertAction `xml:"actions>alertAction"`
}

type AlertPartialChannel

type AlertPartialChannel struct {
	XMLName                struct{} `xml:"entry"`
	ChannelId              string   `xml:"string"`
	EnabledConnectors      []int    `xml:"alertConnectors>enabledConnectors>int"`
	NewDestinationEnabled  *bool    `xml:"alertConnectors>enabledConnectors>null"`
	DisabledConnectors     []int    `xml:"alertConnectors>disabledConnectors>int"`
	NewDestinationDisabled *bool    `xml:"alertConnectors>disabledConnectors>null"`
}

type AlertTrigger

type AlertTrigger struct {
	XMLName               struct{}              `xml:"trigger"`
	Class                 string                `xml:"class,attr"`
	NewChannelSource      bool                  `xml:"alertChannels>newChannelSource"`
	NewChannelDestination bool                  `xml:"alertChannels>newChannelDestination"`
	EnabledChannels       []string              `xml:"alertChannels>enabledChannels>string"`
	DisabledChannels      []string              `xml:"alertChannels>disabledChannels>string"`
	PartialChannels       []AlertPartialChannel `xml:"alertChannels>partialChannels>entry"`
	ErrorEventTypes       []string              `xml:"errorEventTypes>errorEventType"`
	Regex                 string                `xml:"regex"`
}

type Alerts

type Alerts struct {
	XMLName struct{} `xml:"list"`
	Alerts  []Alert  `xml:"alertModel"`
}

type BackgroundColor

type BackgroundColor struct {
	//XMLName struct{} `xml:"backgroundColor"`
	Red   int `xml:"red"`
	Green int `xml:"green"`
	Blue  int `xml:"blue"`
	Alpha int `xml:"alpha"`
}

type ChannelDependencies

type ChannelDependencies struct {
	XMLName      struct{}            `xml:"set"`
	Dependencies []ChannelDependency `xml:"channelDependency"`
}

type ChannelDependency

type ChannelDependency struct {
	DependentId  string `xml:"dependentId"`
	DependencyId string `xml:"dependencyId"`
}

type ChannelTag

type ChannelTag struct {
	XMLName         struct{}        `xml:"channelTag"`
	Id              string          `xml:"id"`
	Name            string          `xml:"name"`
	Channels        []string        `xml:"channelIds>string"`
	BackgroundColor BackgroundColor `xml:"backgroundColor"`
}

type ChannelTags

type ChannelTags struct {
	XMLName struct{}     `xml:"set"`
	Tags    []ChannelTag `xml:"channelTag"`
}

type CharacterSets

type CharacterSets struct {
	XMLName      struct{} `xml:"list"`
	CharacterSet []string `xml:"string"`
}

type ConfigurationMap

type ConfigurationMap struct {
	XMLName struct{}                `xml:"map"`
	Entries []ConfigurationMapEntry `xml:"entry"`
}

type ConfigurationMapEntry

type ConfigurationMapEntry struct {
	XMLName struct{} `xml:"entry"`
	Key     string   `xml:"string"`
	Value   string   `xml:"com.mirth.connect.util.ConfigurationProperty>value"`
}

type DatabaseDriverInfo

type DatabaseDriverInfo struct {
	XMLName               struct{} `xml:"driverInfo"`
	ClassName             string   `xml:"className,omitempty"`
	Name                  string   `xml:"name,omitempty"`
	Template              string   `xml:"template,omitempty"`
	SelectLimit           string   `xml:"selectLimit,omitempty"`
	AlternativeClassNames []string `xml:"alternativeClassNames>string"`
}

type DatabaseDrivers

type DatabaseDrivers struct {
	XMLName struct{}             `xml:"list"`
	Drivers []DatabaseDriverInfo `xml:"driverInfo"`
}

type EncryptionSettings

type EncryptionSettings struct {
	XMLName             struct{} `xml:"com.mirth.connect.model.EncryptionSettings"`
	EncryptExport       bool     `xml:"encryptExport,omitempty"`
	EncryptProperties   bool     `xml:"encryptProperties,omitempty"`
	EncryptionAlgorithm string   `xml:"encryptionAlgorithm,omitempty"`
	EncryptionKeyLength int      `xml:"encryptionKeyLength,omitempty"`
	DigestAlgorithm     string   `xml:"digestAlgorithm,omitempty"`
	SecurityProvider    string   `xml:"securityProvider,omitempty"`
	SecretKey           string   `xml:"secretKey,omitempty"`
}

type GlobalScript

type GlobalScript struct {
	XMLName  struct{} `xml:"entry"`
	Contents []string `xml:"string"`
}

type GlobalScripts

type GlobalScripts struct {
	XMLName struct{}       `xml:"map"`
	Scripts []GlobalScript `xml:"entry"`
}

func (*GlobalScripts) GetDeployScript

func (gs *GlobalScripts) GetDeployScript() string

func (*GlobalScripts) GetPostprocessorScript

func (gs *GlobalScripts) GetPostprocessorScript() string

func (*GlobalScripts) GetPreprocessorScript

func (gs *GlobalScripts) GetPreprocessorScript() string

func (*GlobalScripts) GetUndeployScript

func (gs *GlobalScripts) GetUndeployScript() string

func (*GlobalScripts) SetDeployScript

func (gs *GlobalScripts) SetDeployScript(scriptCode string)

func (*GlobalScripts) SetPostprocessorScript

func (gs *GlobalScripts) SetPostprocessorScript(scriptCode string)

func (*GlobalScripts) SetPreprocessorScript

func (gs *GlobalScripts) SetPreprocessorScript(scriptCode string)

func (*GlobalScripts) SetUndeployScript

func (gs *GlobalScripts) SetUndeployScript(scriptCode string)

type MetaDataColumn

type MetaDataColumn struct {
	XMLName     struct{} `xml:"metaDataColumn"`
	Name        string   `xml:"name,omitempty"`
	Type        string   `xml:"type,omitempty"`
	MappingName string   `xml:"mappingName,omitempty"`
}

type Metadata

type Metadata struct {
	XMLName         struct{}                `xml:"com.mirth.connect.model.ChannelMetadata"`
	Enabled         bool                    `xml:"enabled"`
	LastModified    MirthTime               `xml:"lastModified"`
	PruningSettings MetadataPruningSettings `xml:"pruningSettings"`
}

type MetadataEntry

type MetadataEntry struct {
	XMLName   struct{} `xml:"entry"`
	ChannelId string   `xml:"string"`
	Metadata  Metadata `xml:"com.mirth.connect.model.ChannelMetadata"`
}

type MetadataList

type MetadataList struct {
	XMLName struct{}        `xml:"map"`
	List    []MetadataEntry `xml:"entry"`
}

type MetadataPruningSettings

type MetadataPruningSettings struct {
	XMLName           struct{} `xml:"pruningSettings"`
	ArchiveEnabled    bool     `xml:"archiveEnabled"`
	PruneMetaDataDays int      `xml:"pruneMetaDataDays,omitempty"`
	PruneContentDays  int      `xml:"pruneContentDays,omitempty"`
}

type MirthApiConfig

type MirthApiConfig struct {
	Host       string
	Port       int
	BaseUrl    string
	IgnoreCert bool
}

type MirthApiResponse

type MirthApiResponse struct {
	Code int
	Body []byte
}

type MirthLoginStatus

type MirthLoginStatus struct {
	Success    bool
	Status     string `xml:"status"`
	Message    string `xml:"message"`
	JsessionId http.Cookie
}

type MirthSession

type MirthSession struct {
	Success    bool
	Status     string `xml:"status"`
	Message    string `xml:"message"`
	JsessionId http.Cookie
}

type MirthSystemInfo

type MirthSystemInfo struct {
	JvmVersion      string `xml:"jvmVersion"`
	OsName          string `xml:"osName"`
	OsVersion       string `xml:"osVersion"`
	OsArchitecture  string `xml:"osArchitecture"`
	DatabaseName    string `xml:"dbName"`
	DatabaseVersion string `xml:"dbVersion"`
}

type MirthSystemStats

type MirthSystemStats struct {
	TimeStamp            MirthTime `xml:"timestamp"`
	CpuUsagePercentage   float32   `xml:"cpuUsagePct"`
	AllocatedMemoryBytes int       `xml:"allocatedMemoryBytes"`
	FreeMemoryBytes      int       `xml:"freeMemoryBytes"`
	MaxMemoryBytes       int       `xml:"maxMemoryBytes"`
	DiskFreeBytes        int       `xml:"diskFreeBytes"`
	DiskTotalBytes       int       `xml:"diskTotalBytes"`
}

type MirthTime

type MirthTime struct {
	Time     string `xml:"time"`
	TimeZone string `xml:"timezone"`
}

MirthTime TODO add function to convert the Time from epoch to "something"

type MirthUser

type MirthUser struct {
	Id               string    `xml:"id"`
	Username         string    `xml:"username"`
	Email            string    `xml:"email"`
	FirstName        string    `xml:"firstName"`
	LastName         string    `xml:"lastName"`
	Organization     string    `xml:"organization"`
	Description      string    `xml:"description"`
	PhoneNumber      string    `xml:"phoneNumber"`
	Industry         string    `xml:"industry"`
	LastLogin        MirthTime `xml:"lastLogin"`
	StrikeCount      int       `xml:"strikeCount"`
	GracePeriodStart MirthTime `xml:"gracePeriodStart"`
	LastStrike       MirthTime `xml:"lastStrikeTime"`
}

type MirthUsers

type MirthUsers struct {
	Users []MirthUser `xml:"user"`
}

type PasswordRequirements

type PasswordRequirements struct {
	XMLName        struct{} `xml:"passwordRequirements"`
	MinimumLength  int      `xml:"minLength"`
	MinimumUpper   int      `xml:"minUpper"`
	MinimumLower   int      `xml:"minLower"`
	MinimumNumeric int      `xml:"minNumeric"`
	MinimumSpecial int      `xml:"minSpecial"`
	RetryLimit     int      `xml:"retryLimit"`
	LockoutPeriod  int      `xml:"lockoutPeriod"`
	Expiration     int      `xml:"expiration"`
	GracePeriod    int      `xml:"gracePeriod"`
	ReusePeriod    int      `xml:"reusePeriod"`
	ReuseLimit     int      `xml:"reuseLimit"`
}

type ProtocolOrCipherEntry

type ProtocolOrCipherEntry struct {
	XMLName       struct{} `xml:"entry"`
	EntryType     string   `xml:"string"`
	EntryContents []string `xml:"string-array>string"`
}

type ProtocolsAndCiphers

type ProtocolsAndCiphers struct {
	XMLName struct{}                `xml:"map"`
	Entries []ProtocolOrCipherEntry `xml:"entry"`
}

func (*ProtocolsAndCiphers) GetEnabledCipherSuites

func (pc *ProtocolsAndCiphers) GetEnabledCipherSuites() []string

func (*ProtocolsAndCiphers) GetEnabledClientProtocols

func (pc *ProtocolsAndCiphers) GetEnabledClientProtocols() []string

func (*ProtocolsAndCiphers) GetEnabledServerProtocols

func (pc *ProtocolsAndCiphers) GetEnabledServerProtocols() []string

func (*ProtocolsAndCiphers) GetSupportedCipherSuites

func (pc *ProtocolsAndCiphers) GetSupportedCipherSuites() []string

func (*ProtocolsAndCiphers) GetSupportedProtocols

func (pc *ProtocolsAndCiphers) GetSupportedProtocols() []string

type QueryParams

type QueryParams struct {
	Key   string
	Value string
}

type Resource

type Resource struct {
	XMLName                  struct{} `xml:"com.mirth.connect.plugins.directoryresource.DirectoryResourceProperties"`
	PluginPointName          string   `xml:"pluginPointName"`
	Type                     string   `xml:"type"`
	Id                       string   `xml:"id"`
	Name                     string   `xml:"name"`
	Description              string   `xml:"description"`
	IncludeWithGlobalScripts bool     `xml:"includeWithGlobalScripts"`
	Directory                string   `xml:"directory"`
	DirectoryRecursion       bool     `xml:"directoryRecursion"`
}

func (*Resource) DefaultPluginPointName

func (r *Resource) DefaultPluginPointName() string

func (*Resource) DefaultType

func (r *Resource) DefaultType() string

type Resources

type Resources struct {
	XMLName struct{}   `xml:"list"`
	Entries []Resource `xml:"com.mirth.connect.plugins.directoryresource.DirectoryResourceProperties"`
}

type ServerSettings

type ServerSettings struct {
	XMLName                struct{}         `xml:"serverSettings"`
	EnvironmentName        string           `xml:"environmentName,omitempty"`
	ServerName             string           `xml:"serverName,omitempty"`
	ClearGlobalMap         bool             `xml:"clearGlobalMap,omitempty"`
	QueueBufferSize        int              `xml:"queueBufferSize,omitempty"`
	SmtpHost               string           `xml:"smtpHost,omitempty"`
	SmtpPort               string           `xml:"smtpPort,omitempty"`
	SmtpTimeout            string           `xml:"smtpTimeout,omitempty"`
	SmtpFrom               string           `xml:"smtpFrom,omitempty"`
	SmtpSecure             string           `xml:"smtpSecure,omitempty"`
	SmtpAuth               bool             `xml:"smtpAuth,omitempty"`
	SmtpUsername           string           `xml:"smtpUsername,omitempty"`
	SmtpPassword           string           `xml:"smtpPassword,omitempty"`
	DefaultBackgroundColor BackgroundColor  `xml:"defaultAdministratorBackgroundColor"`
	DefaultMetaDataColumns []MetaDataColumn `xml:"defaultMetaDataColumns>metaDataColumn"`
}

Jump to

Keyboard shortcuts

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