ekr

package
v0.0.0-...-043af89 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2019 License: MIT Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArrayOfFilterItem

type ArrayOfFilterItem struct {
	XMLName xml.Name `xml:"http://schemas.datacontract.org/2004/07/Anasoft.eDesk.eDeskII.Model ArrayOfFilterItem"`

	FilterItem *FilterItem `xml:"FilterItem,omitempty"`
}

ArrayOfFilterItem ...

type ArrayOfMessage

type ArrayOfMessage struct {
	XMLName xml.Name `xml:"http://schemas.datacontract.org/2004/07/Anasoft.eDesk.eDeskII.Model ArrayOfMessage"`

	Message []*Message `xml:"Message,omitempty"`
}

ArrayOfMessage ...

type ArrayResultOfMessage3PnOaNPm

type ArrayResultOfMessage3PnOaNPm struct {
	XMLName xml.Name `xml:"http://schemas.datacontract.org/2004/07/Anasoft.eDesk.eDeskII.Model ArrayResultOfMessage3PnOaN_Pm"`

	TotalCount int             `xml:"TotalCount,omitempty"`
	Values     *ArrayOfMessage `xml:"Values,omitempty"`
}

ArrayResultOfMessage3PnOaNPm ...

type ChannelInfo

type ChannelInfo struct {
	Channel []string `xml:"Channel>ChannelInfoURI"`
}

ChannelInfo ...

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client ...

func NewClient

func NewClient(name, ekrurl string, iamc *iam.Client, soapOptions ...soap.Option) (*Client, error)

NewClient ...

func (*Client) CreateFolder

func (c *Client) CreateFolder(request *CreateFolder) (*CreateFolderResponse, error)

CreateFolder ...

func (*Client) DeleteMessage

func (c *Client) DeleteMessage(IDMessage int) (bool, error)

DeleteMessage ...

func (*Client) GetFolders

func (c *Client) GetFolders() ([]*Folder, error)

GetFolders ...

func (*Client) GetMessage

func (c *Client) GetMessage(IDMessage int) (*Message, error)

GetMessage returns message data. returns nil if message don't exists, or was deleted

func (*Client) GetMessageByMessageID

func (c *Client) GetMessageByMessageID(MessageID string) (*Message, error)

GetMessageByMessageID Vráti údaje o správe - SkTalk neobsahuje údaje príloh, iba ich metadáta

func (*Client) GetMessagePart

func (c *Client) GetMessagePart(idMessage int, partID string) (*MessagePart, error)

GetMessagePart ...

func (*Client) GetMessages

func (c *Client) GetMessages(IDFolder, Count, StartIndex int) ([]*Message, error)

GetMessages Vráti údaje o správach ako zoznam objektov typu Message. Parametre count a startIndex v tejto metóde slúžia na to, aby sa nevracala celá množina správ ale iba určená časť daná týmto stránkovaním

func (*Client) GetMessagesByFilter

func (c *Client) GetMessagesByFilter(request *GetMessagesByFilter) (*GetMessagesByFilterResponse, error)

GetMessagesByFilter ...

func (*Client) GetNewMessage

func (c *Client) GetNewMessage() (*Message, error)

GetNewMessage returns the oldest unreaded message and marks it as readed

func (*Client) GetNewMessageCount

func (c *Client) GetNewMessageCount() (int, error)

GetNewMessageCount Vráti počet nových správ prihlásenej identity

func (*Client) MoveMessage

func (c *Client) MoveMessage(request *MoveMessage) (*MoveMessageResponse, error)

MoveMessage ...

type Component

type Component struct {
	URI            string
	Product        string
	Version        string
	Timestamp      time.Time
	ProcessingInfo *ProcessingInfo
}

Component ...

type CreateFolder

type CreateFolder struct {
	XMLName xml.Name `xml:"http://schemas.gov.sk/edesk/eksService/1 CreateFolder"`

	IDFolderParent int32 `xml:"idFolderParent,omitempty"`

	Name string `xml:"name,omitempty"`
}

CreateFolder ...

type CreateFolderResponse

type CreateFolderResponse struct {
	XMLName xml.Name `xml:"http://schemas.gov.sk/edesk/eksService/1 CreateFolderResponse"`

	CreateFolderResult *Folder `xml:"CreateFolderResult,omitempty"`
}

CreateFolderResponse ...

type DeleteMessage

type DeleteMessage struct {
	XMLName xml.Name `xml:"http://schemas.gov.sk/edesk/eksService/1 DeleteMessage"`

	IDMessage int `xml:"idMessage,omitempty"`
}

DeleteMessage ...

type DeleteMessageResponse

type DeleteMessageResponse struct {
	XMLName xml.Name `xml:"http://schemas.gov.sk/edesk/eksService/1 DeleteMessageResponse"`

	DeleteMessageResult bool `xml:"DeleteMessageResult,omitempty"`
}

DeleteMessageResponse ...

type Encoding

type Encoding string

Encoding Kódovanie obsahu

const (
	XML    Encoding = "XML"
	Base64 Encoding = "Base64"
)

povelene hodnoty Encoding

type Filter

type Filter struct {
	XMLName xml.Name `xml:"http://schemas.datacontract.org/2004/07/Anasoft.eDesk.eDeskII.Model Filter"`

	Items *ArrayOfFilterItem `xml:"Items,omitempty"`
}

Filter ...

type FilterItem

type FilterItem struct {
	XMLName xml.Name `xml:"http://schemas.datacontract.org/2004/07/Anasoft.eDesk.eDeskII.Model FilterItem"`

	Name  string `xml:"Name,omitempty"`
	Value string `xml:"Value,omitempty"`
}

FilterItem ...

type Folder

type Folder struct {
	XMLName xml.Name `xml:"http://schemas.datacontract.org/2004/07/Anasoft.eDesk.eDeskII.Model Folder"`

	IDFolder       int    `xml:"IdFolder,omitempty"`
	IDFolderParent int    `xml:"IdFolderParent,omitempty"`
	Name           string `xml:"Name,omitempty"`
	SystemFolder   bool   `xml:"SystemFolder,omitempty"`
}

Folder ...

type GetFolders

type GetFolders struct {
	XMLName xml.Name `xml:"http://schemas.gov.sk/edesk/eksService/1 GetFolders"`
}

GetFolders ...

type GetFoldersResponse

type GetFoldersResponse struct {
	XMLName xml.Name `xml:"http://schemas.gov.sk/edesk/eksService/1 GetFoldersResponse"`

	GetFoldersResult []*Folder `xml:"GetFoldersResult>Values>Folder,omitempty"`
}

GetFoldersResponse ...

type GetMessageByMessageID

type GetMessageByMessageID struct {
	XMLName xml.Name `xml:"http://schemas.gov.sk/edesk/eksService/1 GetMessageByMessageId"`

	MessageID string `xml:"messageId,omitempty"`
}

GetMessageByMessageID ...

type GetMessageByMessageIDResponse

type GetMessageByMessageIDResponse struct {
	XMLName xml.Name `xml:"http://schemas.gov.sk/edesk/eksService/1 GetMessageByMessageIdResponse"`

	GetMessageByMessageIDResult *Message `xml:"GetMessageByMessageIdResult,omitempty"`
}

GetMessageByMessageIDResponse ...

type GetMessagePart

type GetMessagePart struct {
	XMLName xml.Name `xml:"http://schemas.gov.sk/edesk/eksService/1 GetMessagePart"`

	IDMessage int `xml:"idMessage,omitempty"`

	PartID string `xml:"partId,omitempty"`
}

GetMessagePart ...

type GetMessagePartResponse

type GetMessagePartResponse struct {
	XMLName xml.Name `xml:"http://schemas.gov.sk/edesk/eksService/1 GetMessagePartResponse"`

	GetMessagePartResult *MessagePart `xml:"GetMessagePartResult,omitempty"`
}

GetMessagePartResponse ...

type GetMessages

type GetMessages struct {
	XMLName xml.Name `xml:"http://schemas.gov.sk/edesk/eksService/1 GetMessages"`

	IDFolder int `xml:"idFolder,omitempty"`

	Count int `xml:"count"`

	StartIndex int `xml:"startIndex"`
}

GetMessages ...

type GetMessagesByFilter

type GetMessagesByFilter struct {
	XMLName xml.Name `xml:"http://schemas.gov.sk/edesk/eksService/1 GetMessagesByFilter"`

	Filter *Filter `xml:"filter,omitempty"`

	Count int32 `xml:"count,omitempty"`

	StartIndex int32 `xml:"startIndex,omitempty"`
}

GetMessagesByFilter ...

type GetMessagesByFilterResponse

type GetMessagesByFilterResponse struct {
	XMLName xml.Name `xml:"http://schemas.gov.sk/edesk/eksService/1 GetMessagesByFilterResponse"`

	GetMessagesByFilterResult *ArrayResultOfMessage3PnOaNPm `xml:"GetMessagesByFilterResult,omitempty"`
}

GetMessagesByFilterResponse ...

type GetMessagesResponse

type GetMessagesResponse struct {
	XMLName xml.Name `xml:"http://schemas.gov.sk/edesk/eksService/1 GetMessagesResponse"`

	GetMessagesResult []*Message `xml:"GetMessagesResult>Values>Message,omitempty"`
}

GetMessagesResponse ...

type GetNewMessage

type GetNewMessage struct {
	XMLName xml.Name `xml:"http://schemas.gov.sk/edesk/eksService/1 GetNewMessage"`
}

GetNewMessage ...

type GetNewMessageCount

type GetNewMessageCount struct {
	XMLName xml.Name `xml:"http://schemas.gov.sk/edesk/eksService/1 GetNewMessageCount"`
}

GetNewMessageCount ...

type GetNewMessageCountResponse

type GetNewMessageCountResponse struct {
	XMLName xml.Name `xml:"http://schemas.gov.sk/edesk/eksService/1 GetNewMessageCountResponse"`

	GetNewMessageCountResult int `xml:"GetNewMessageCountResult,omitempty"`
}

GetNewMessageCountResponse ...

type GetNewMessageResponse

type GetNewMessageResponse struct {
	XMLName xml.Name `xml:"http://schemas.gov.sk/edesk/eksService/1 GetNewMessageResponse"`

	GetNewMessageResult *Message `xml:"GetNewMessageResult,omitempty"`
}

GetNewMessageResponse ...

type Identity

type Identity struct {
	ActorID               string `xml:"http://gov.sk/Iam/SamlAssertions Assertions>ActorID"`
	ActorFormattedName    string `xml:"http://gov.sk/Iam/SamlAssertions Assertions>Actor.FormattedName"`
	SubjectFormatedName   string `xml:"http://gov.sk/Iam/SamlAssertions Assertions>Subject.FormattedName"`
	SubjectUPVSIdentityID string `xml:"http://gov.sk/Iam/SamlAssertions Assertions>Subject.UPVSIdentityID"`
}

Identity ...

type Message

type Message struct {
	Title         string `xml:"Title,omitempty"`
	Class         string `xml:"Class,omitempty"`
	CorrelationID string `xml:"CorrelationId,omitempty"`
	DateDel       string `xml:"DateDelivery,omitempty"`
	IDMessage     int    `xml:"IdMessage,omitempty"`
	MessageID     string `xml:"MessageId,omitempty"`
	Body          string `xml:"Body,omitempty"`
	SkTalkData    []byte `xml:"SkTalk,omitempty"`
}

Message the message type

func (*Message) SkTalk

func (m *Message) SkTalk() (*SKTalkMessage, error)

SkTalk parses skTalk xml and returns SKTalkMessage

type MessageContainer

type MessageContainer struct {
	XMLName                    xml.Name `xml:"http://schemas.gov.sk/core/MessageContainer/1.0 MessageContainer"`
	NSXSD                      string   `xml:"xmlns:xsd,attr"`
	NSXSI                      string   `xml:"xmlns:xsi,attr"`
	XSISchemaLocation          string   `xml:"xsi:schemaLocation,attr"`
	MessageID                  string   `xml:"MessageId"`
	SenderID                   string   `xml:"SenderId"`
	RecipientID                string   `xml:"RecipientId"`
	MessageType                string
	MessageSubject             string
	SenderBusinessReference    string
	RecipientBusinessReference string
	Object                     []*Object
}

MessageContainer ...

type MessageInfo

type MessageInfo struct {
	Class            string       `xml:",omitempty"`
	PospID           string       `xml:",omitempty"`
	PospVersion      string       `xml:",omitempty"`
	MessageID        string       `xml:",omitempty"`
	CorrelationID    string       `xml:",omitempty"`
	ReferenceID      string       `xml:",omitempty"`
	BusinessID       string       `xml:",omitempty"`
	ChannelInfo      *ChannelInfo `xml:",omitempty"`
	ChannelInfoReply *ChannelInfo `xml:",omitempty"`
}

MessageInfo ...

type MessagePart

type MessagePart struct {
	Class       string `xml:"Class,omitempty"`
	Data        string `xml:"Data,omitempty"`
	Description string `xml:"Description,omitempty"`
	MimeType    string `xml:"MimeType,omitempty"`
	Name        string `xml:"Name,omitempty"`
	PartID      string `xml:"PartId,omitempty"`
}

MessagePart ...

func (*MessagePart) GetData

func (mp *MessagePart) GetData() ([]byte, error)

GetData parses base64 data

type MoveMessage

type MoveMessage struct {
	XMLName xml.Name `xml:"http://schemas.gov.sk/edesk/eksService/1 MoveMessage"`

	IDMessage int `xml:"idMessage,omitempty"`

	IDFolderTarget int `xml:"idFolderTarget,omitempty"`
}

MoveMessage ...

type MoveMessageResponse

type MoveMessageResponse struct {
	XMLName xml.Name `xml:"http://schemas.gov.sk/edesk/eksService/1 MoveMessageResponse"`
}

MoveMessageResponse ...

type Object

type Object struct {
	ID          string   `xml:"Id,attr"`
	Name        string   `xml:"Name,attr"`        //Názov objektu, obyčajne názov pôvodného súboru
	Description string   `xml:"Description,attr"` //Popis objektu, určený na zobrazenie
	Class       string   `xml:"Class,attr"`       //Trieda objektu, slúži na identifikovanie typu, resp. účelu. Je to číselníková hodnota
	IsSigned    bool     `xml:"IsSigned,attr"`    //Príznak, či objekt je podpísaný
	MimeType    string   `xml:"MimeType,attr"`    //Typ obsahu objektu, určuje dátový formát objektu
	Encoding    Encoding `xml:"Encoding,attr"`    //Kódovanie obsahu a spôsob interpretácie dát. Povolené hodnoty XML a Base64
	Form        string   `xml:",innerxml"`        //Vnorený formulár vo vlastnom namespace
}

Object Predstavuje jeden objekt elektronickej správy

func (*Object) GetData

func (o *Object) GetData() ([]byte, error)

GetData deserializes inner data

type ProcessingInfo

type ProcessingInfo struct {
	RaisedBy string
	Number   int
	Type     string
	Text     string
	Location string
}

ProcessingInfo ...

type SKTalkHeader

type SKTalkHeader struct {
	XMLName xml.Name `xml:"Header"`

	MessageInfo *MessageInfo
	SenderInfo  *SenderInfo
	RoutingInfo []*Component
}

SKTalkHeader ...

type SKTalkMessage

type SKTalkMessage struct {
	NSXSD           string            `xml:"xmlns:xsd,attr"`
	NSXSI           string            `xml:"xmlns:xsi,attr"`
	EnvelopeVersion string            `xml:"EnvelopeVersion,omitempty"`
	Header          *SKTalkHeader     `xml:"Header"`
	Body            *MessageContainer `xml:"Body>MessageContainer,omitempty"`
}

SKTalkMessage ...

type SenderInfo

type SenderInfo struct {
	SecurityMethod string
	SecurityToken  string `xml:",innerxml"`
	Identity       *Identity
}

SenderInfo ...

Jump to

Keyboard shortcuts

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