-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
wagon_document.go
52 lines (45 loc) · 2.11 KB
/
wagon_document.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
/*
Copyright © 2022 Macaroni OS Linux
See AUTHORS and LICENSE for the license details and contributors.
*/
package repository
import (
artifact "github.com/geaaru/luet/pkg/v2/compiler/types/artifact"
compression "github.com/geaaru/luet/pkg/v2/compiler/types/compression"
)
// SetFileName sets the name of the repository file.
// Each repository can ship arbitrary file that will be downloaded by the client
// in case of need, this set the filename that the client will pull
func (f *WagonDocument) SetFileName(n string) {
f.FileName = n
}
// GetFileName returns the name of the repository file.
// Each repository can ship arbitrary file that will be downloaded by the client
// in case of need, this gets the filename that the client will pull
func (f *WagonDocument) GetFileName() string {
return f.FileName
}
// SetCompressionType sets the compression type of the repository file.
// Each repository can ship arbitrary file that will be downloaded by the client
// in case of need, this sets the compression type that the client will use to uncompress the artifact
func (f *WagonDocument) SetCompressionType(c compression.Implementation) {
f.CompressionType = c
}
// GetCompressionType gets the compression type of the repository file.
// Each repository can ship arbitrary file that will be downloaded by the client
// in case of need, this gets the compression type that the client will use to uncompress the artifact
func (f *WagonDocument) GetCompressionType() compression.Implementation {
return f.CompressionType
}
// SetChecksums sets the checksum of the repository file.
// Each repository can ship arbitrary file that will be downloaded by the client
// in case of need, this sets the checksums that the client will use to verify the artifact
func (f *WagonDocument) SetChecksums(c artifact.Checksums) {
f.Checksums = c
}
// GetChecksums gets the checksum of the repository file.
// Each repository can ship arbitrary file that will be downloaded by the client
// in case of need, this gets the checksums that the client will use to verify the artifact
func (f *WagonDocument) GetChecksums() artifact.Checksums {
return f.Checksums
}