MCPcopy Create free account
hub / github.com/SignTools/SignTools / MakeSemaphore

Function MakeSemaphore

src/builders/semaphore.go:21–34  ·  view source on GitHub ↗
(data *SemaphoreData)

Source from the content-addressed store, hash-verified

19}
20
21func MakeSemaphore(data *SemaphoreData) *Semaphore {
22 baseUrl := fmt.Sprintf("https://%s.semaphoreci.com/", data.OrgName)
23 return &Semaphore{
24 data: data,
25 baseUrl: baseUrl,
26 client: sling.New().Client(MakeClient()).
27 Base(baseUrl+"api/").
28 // as per API spec
29 Set("User-Agent", "SemaphoreCI v2.0 Client").
30 SetMany(map[string]string{
31 "Authorization": "Token " + data.Token,
32 }),
33 }
34}
35
36type Semaphore struct {
37 data *SemaphoreData

Callers 1

MakeEnabledMethod · 0.92

Calls 2

MakeClientFunction · 0.85
NewMethod · 0.80

Tested by

no test coverage detected