-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathimagechunk.go
executable file
·54 lines (44 loc) · 1.09 KB
/
imagechunk.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
package main
import (
"fmt"
)
// ImageChunk denotes table
type ImageChunk struct {
Position int
Id string
Caption string //optional
Numbering string //optional Numbering before Caption
Src string
}
// String implements the Stringer interface
func (p ImageChunk) String() string {
return fmt.Sprintf("ImageChunk{Position: %d, Id: %v, Caption: %v, Src: %v}",
p.GetPosition(), p.Id, p.Caption, p.Src)
}
// GetPosition implements the Chunk interface
func (p *ImageChunk) GetPosition() int {
return p.Position
}
// SetPosition implements the Chunk interface
func (p *ImageChunk) SetPosition(pos int) {
p.Position = pos
}
// GetValue implements the Chunk interface
func (p *ImageChunk) GetValue() string {
return p.Id
}
func (p *ImageChunk) GetId() string {
return p.Id
}
func (p *ImageChunk) GetCaption() string {
return p.Caption
}
func (p *ImageChunk) SetCaption(c string) {
p.Caption = c
}
func (p *ImageChunk) SetNumbering(c string) {
p.Numbering = c
}
func (p ImageChunk) GetNumbering() string {
return p.Numbering
}