Documentation
¶
Index ¶
- Variables
- func APIBuild() *api.Build
- func APIDashboard() *api.Dashboard
- func APIDashboardRepo() *api.DashboardRepo
- func APIDeployment() *api.Deployment
- func APIEvents() *api.Events
- func APIHook() *api.Hook
- func APILog() *api.Log
- func APIPipeline() *api.Pipeline
- func APIRepo() *api.Repo
- func APISchedule() *api.Schedule
- func APISecret() *api.Secret
- func APIService() *api.Service
- func APIStep() *api.Step
- func APIUser() *api.User
- func CreateMockRows(data []any) *sqlmock.Rows
- func JWK() jwk.RSAPublicKey
- func TestPostgresGormInit(sql *sql.DB) (*gorm.DB, error)
- type AnyArgument
- type NowTimestamp
Constants ¶
This section is empty.
Variables ¶
View Source
var JwkKeyOpts = cmp.Options{ cmp.FilterValues(func(x, y interface{}) bool { _, xOk := x.(jwk.RSAPublicKey) _, yOk := y.(jwk.RSAPublicKey) return xOk && yOk }, cmp.Comparer(func(x, y interface{}) bool { xJWK := x.(jwk.RSAPublicKey) yJWK := y.(jwk.RSAPublicKey) xkid, ok := xJWK.KeyID() if !ok { return false } ykid, ok := yJWK.KeyID() if !ok { return false } return reflect.DeepEqual(xJWK, yJWK) && xkid == ykid })), }
Functions ¶
func APIDashboard ¶
func APIDashboardRepo ¶
func APIDashboardRepo() *api.DashboardRepo
func APIDeployment ¶
func APIDeployment() *api.Deployment
func APIPipeline ¶
func APISchedule ¶
func APIService ¶
func CreateMockRows ¶ added in v0.27.0
func CreateMockRows(data []any) *sqlmock.Rows
func JWK ¶
func JWK() jwk.RSAPublicKey
func TestPostgresGormInit ¶ added in v0.26.5
testPostgresGormInit initializes a Gorm DB for postgres testing.
TODO: remove this when Gorm updates a bug they introduced in 1.30.1 where the special dialector config is overwritten in the Open(..) function.
Types ¶
type AnyArgument ¶
type AnyArgument struct{}
This will be used with the github.com/DATA-DOG/go-sqlmock library to compare values that are otherwise not easily compared. These typically would be values generated before adding or updating them in the database.
https://github.com/DATA-DOG/go-sqlmock#matching-arguments-like-timetime
type NowTimestamp ¶
type NowTimestamp struct{}
NowTimestamp is used to test whether timestamps get updated correctly to the current time with lenience.
Click to show internal directories.
Click to hide internal directories.