MCPcopy Create free account
hub / github.com/cloudbase/garm / ForgeURL

Method ForgeURL

params/params.go:1387–1404  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1385}
1386
1387func (g ForgeEntity) ForgeURL() string {
1388 baseURL := strings.TrimRight(g.Credentials.BaseURL, "/")
1389
1390 switch g.Credentials.ForgeType {
1391 case GiteaEndpointType:
1392 return g.Credentials.Endpoint.APIBaseURL
1393 default:
1394 switch g.EntityType {
1395 case ForgeEntityTypeRepository:
1396 return fmt.Sprintf("%s/%s/%s", baseURL, g.Owner, g.Name)
1397 case ForgeEntityTypeOrganization:
1398 return fmt.Sprintf("%s/%s", baseURL, g.Owner)
1399 case ForgeEntityTypeEnterprise:
1400 return fmt.Sprintf("%s/enterprises/%s", baseURL, g.Owner)
1401 }
1402 }
1403 return ""
1404}
1405
1406func (g ForgeEntity) GetPoolBalancerType() PoolBalancerType {
1407 if g.PoolBalancerType == "" {

Callers 6

GetInstanceMetadataMethod · 0.80
addInstanceToProviderMethod · 0.80
retryFailedWorkersMethod · 0.80
getActionServiceInfoMethod · 0.80

Implementers 3

Repositorydatabase/sql/models.go
Organizationdatabase/sql/models.go
Enterprisedatabase/sql/models.go

Calls

no outgoing calls

Tested by

no test coverage detected