| 478 | } |
| 479 | |
| 480 | type GithubCredentials struct { |
| 481 | gorm.Model |
| 482 | |
| 483 | Name string `gorm:"index:idx_github_credentials,unique;type:varchar(64) collate nocase"` |
| 484 | UserID *uuid.UUID `gorm:"index:idx_github_credentials,unique"` |
| 485 | User User `gorm:"foreignKey:UserID"` |
| 486 | |
| 487 | Description string `gorm:"type:text"` |
| 488 | AuthType params.ForgeAuthType `gorm:"index"` |
| 489 | Payload []byte `gorm:"type:longblob"` |
| 490 | |
| 491 | Endpoint GithubEndpoint `gorm:"foreignKey:EndpointName"` |
| 492 | EndpointName *string `gorm:"index"` |
| 493 | |
| 494 | Repositories []Repository `gorm:"foreignKey:CredentialsID"` |
| 495 | Organizations []Organization `gorm:"foreignKey:CredentialsID"` |
| 496 | Enterprises []Enterprise `gorm:"foreignKey:CredentialsID"` |
| 497 | } |
| 498 | |
| 499 | func (g GithubCredentials) GetEndpointName() *string { |
| 500 | return g.EndpointName |
nothing calls this directly
no outgoing calls
no test coverage detected