| 505 | } |
| 506 | |
| 507 | type GiteaCredentials struct { |
| 508 | gorm.Model |
| 509 | |
| 510 | Name string `gorm:"index:idx_gitea_credentials,unique;type:varchar(64) collate nocase"` |
| 511 | UserID *uuid.UUID `gorm:"index:idx_gitea_credentials,unique"` |
| 512 | User User `gorm:"foreignKey:UserID"` |
| 513 | |
| 514 | Description string `gorm:"type:text"` |
| 515 | AuthType params.ForgeAuthType `gorm:"index"` |
| 516 | Payload []byte `gorm:"type:longblob"` |
| 517 | |
| 518 | Endpoint GithubEndpoint `gorm:"foreignKey:EndpointName"` |
| 519 | EndpointName *string `gorm:"index"` |
| 520 | |
| 521 | Repositories []Repository `gorm:"foreignKey:GiteaCredentialsID"` |
| 522 | Organizations []Organization `gorm:"foreignKey:GiteaCredentialsID"` |
| 523 | } |
| 524 | |
| 525 | func (g GiteaCredentials) GetEndpointName() *string { |
| 526 | return g.EndpointName |
nothing calls this directly
no outgoing calls
no test coverage detected