file

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2024 License: BSD-2-Clause Imports: 5 Imported by: 0

Documentation

Overview

Package file contains shared functionality between various file upload mechanisms.

Index

Constants

View Source
const (
	// The namespace used by this package, provided as a convenience.
	NSMeta = `urn:xmpp:file:metadata:0`
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Meta

type Meta struct {
	MediaType string
	Name      string
	Date      time.Time
	Size      uint64
	Hash      crypto.HashOutput
	Width     uint64
	Height    uint64
	Length    uint64
}

Meta is an element that contains metadata about a file.

func (*Meta) MarshalXML

func (m *Meta) MarshalXML(e *xml.Encoder, _ xml.StartElement) error

MarshalXML implements xml.Marshaler.

func (*Meta) TokenReader

func (m *Meta) TokenReader() xml.TokenReader

TokenReader satisfies the xmlstream.Marshaler interface.

func (*Meta) UnmarshalXML

func (m *Meta) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

UnmarshalXML implements xml.Unmarshaler.

func (*Meta) WriteXML

func (m *Meta) WriteXML(w xmlstream.TokenWriter) (n int, err error)

WriteXML satisfies the xmlstream.WriterTo interface. It is like MarshalXML except it writes tokens to w.

Jump to

Keyboard shortcuts

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