Documentation
¶
Index ¶
Constants ¶
View Source
const (
SpicedbSchemaBootstrapFile = "../internal/data/spicedb-test-data/basic_schema.zed"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LocalKesselContainer ¶
type LocalKesselContainer struct {
Name string
HTTPport string
KeycloakHTTPPort string // host-mapped port for Keycloak HTTP (8080), for use in GetJWTToken etc.
// contains filtered or unexported fields
}
LocalKesselContainer holds the testcontainers for the Kessel API, SpiceDB, and Keycloak
func CreateKesselAPIContainer ¶
func CreateKesselAPIContainer(ctx context.Context, logger log.Logger) (_ *LocalKesselContainer, retErr error)
CreateKesselAPIContainer creates the network, SpiceDB, Keycloak, and Kessel API containers using testcontainers-go
func (*LocalKesselContainer) Close ¶
func (l *LocalKesselContainer) Close()
type TokenResponse ¶
type TokenResponse struct {
AccessToken string `json:"access_token"`
ExpiresIn int `json:"expires_in"`
RefreshToken string `json:"refresh_token"`
}
func GetJWTToken ¶
func GetJWTToken(baseURL, username, password string) (*TokenResponse, error)
GetJWTToken obtains a JWT from Keycloak (baseURL should be the host-accessible URL, e.g. http://localhost:PORT)
Click to show internal directories.
Click to hide internal directories.