forked from UniversalMediaServer/gon
/
status.go
30 lines (24 loc) · 1.01 KB
/
status.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
package notarize
// Status is an interface that can be implemented to receive status callbacks.
//
// All the methods in this interface must NOT block for too long or it'll
// block the notarization process.
type Status interface {
// Submitting is called when the file is being submitted for notarization.
Submitting()
// Submitted is called when the file is submitted to Apple for notarization.
// The arguments give you access to the requestUUID to query more information.
Submitted(requestUUID string)
// Status is called as the status of the submitted package changes.
// The info argument contains additional information about the status.
// Note that some fields in the info argument may not be populated, please
// refer to the docs.
Status(Info)
}
// noopStatus implements Status and does nothing.
type noopStatus struct{}
func (noopStatus) Submitting() {}
func (noopStatus) Submitted(string) {}
func (noopStatus) Status(Info) {}
// Assert that we always implement it
var _ Status = noopStatus{}