contract_tests

package
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 7, 2025 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FGA_ROLE_PROJECT_OWNER            = "role:project/test/owner"
	FGA_ROLE_PROJECT_VAULT_MAINTAINER = "role:project/test/vault_maintainer"
	FGA_ROLE_PROJECT_MEMBER           = "role:project/test/member"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CommonTestSuite

type CommonTestSuite struct {
	suite.Suite
	// contains filtered or unexported fields
}

func (*CommonTestSuite) GqlApiTest

func (s *CommonTestSuite) GqlApiTest(
	middleware *Middleware, userHooksMock *dbMocks.UserHooks, mockFgaEvents fga.FgaEvents,
) *apitest.Request

func (*CommonTestSuite) SetupLogger

func (s *CommonTestSuite) SetupLogger()

func (*CommonTestSuite) TearDownTest

func (s *CommonTestSuite) TearDownTest()

closes database connections between tests - reclaims memory, so each test starts with fresh data

type EntityInput

type EntityInput struct {
	EntityType string `json:"entityType"`
	EntityId   string `json:"entityId"`
}

type InviteInput

type InviteInput struct {
	Email  string      `json:"email"`
	Entity EntityInput `json:"entity"`
	Roles  []string    `json:"roles"`
}

type Middleware

type Middleware = func(http.Handler) http.Handler

type UserInput

type UserInput struct {
	UserID    string `json:"userId"`
	Email     string `json:"email"`
	FirstName string `json:"firstName"`
	LastName  string `json:"lastName"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL