Documentation
¶
Index ¶
- func Authenticate(keyStore *Store, basicUser, basicPass string) func(http.Handler) http.Handler
- type APIKey
- type APIKeyCreateResult
- type AuthInfo
- type GSCConnection
- type KeyLookupResult
- type Project
- type Store
- func (s *Store) Close() error
- func (s *Store) CreateAPIKey(name, keyType string, projectID *string) (*APIKeyCreateResult, error)
- func (s *Store) CreateExtractorSet(name string, extractors []extraction.Extractor) (*extraction.ExtractorSet, error)
- func (s *Store) CreateProject(name string) (*Project, error)
- func (s *Store) CreateRuleset(name string, rules []customtests.TestRule) (*customtests.Ruleset, error)
- func (s *Store) DeleteAPIKey(id string) error
- func (s *Store) DeleteExtractorSet(id string) error
- func (s *Store) DeleteGSCConnection(projectID string) error
- func (s *Store) DeleteProject(id string) error
- func (s *Store) DeleteProviderConnection(projectID, provider string) error
- func (s *Store) DeleteRuleset(id string) error
- func (s *Store) GetExtractorSet(id string) (*extraction.ExtractorSet, error)
- func (s *Store) GetGSCConnection(projectID string) (*GSCConnection, error)
- func (s *Store) GetProject(id string) (*Project, error)
- func (s *Store) GetProviderConnection(projectID, provider string) (*providers.ProviderConnection, error)
- func (s *Store) GetRuleset(id string) (*customtests.Ruleset, error)
- func (s *Store) ListAPIKeys() ([]APIKey, error)
- func (s *Store) ListExtractorSets() ([]extraction.ExtractorSet, error)
- func (s *Store) ListGSCConnections() ([]GSCConnection, error)
- func (s *Store) ListProjects() ([]Project, error)
- func (s *Store) ListProjectsPaginated(limit, offset int, search string) ([]Project, int, error)
- func (s *Store) ListProviderConnections(projectID string) ([]providers.ProviderConnection, error)
- func (s *Store) ListRulesets() ([]customtests.Ruleset, error)
- func (s *Store) RenameProject(id, name string) error
- func (s *Store) SaveGSCConnection(conn *GSCConnection) error
- func (s *Store) SaveProviderConnection(conn *providers.ProviderConnection) error
- func (s *Store) UpdateExtractorSet(id, name string, extractors []extraction.Extractor) error
- func (s *Store) UpdateRuleset(id, name string, rules []customtests.TestRule) error
- func (s *Store) ValidateKey(rawKey string) *KeyLookupResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type APIKey ¶
type APIKey struct {
ID string `json:"id"`
Name string `json:"name"`
KeyPrefix string `json:"key_prefix"`
Type string `json:"type"` // "general" | "project"
ProjectID *string `json:"project_id"`
CreatedAt time.Time `json:"created_at"`
LastUsedAt *time.Time `json:"last_used_at"`
Active bool `json:"active"`
}
type APIKeyCreateResult ¶
type AuthInfo ¶
type AuthInfo struct {
Method string // "basic" | "apikey"
KeyType string // "general" | "project" (only for apikey)
ProjectID *string // non-nil only for project keys
}
func FromContext ¶
func (*AuthInfo) IsReadOnly ¶
type GSCConnection ¶
type KeyLookupResult ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) CreateAPIKey ¶
func (s *Store) CreateAPIKey(name, keyType string, projectID *string) (*APIKeyCreateResult, error)
func (*Store) CreateExtractorSet ¶ added in v0.3.0
func (s *Store) CreateExtractorSet(name string, extractors []extraction.Extractor) (*extraction.ExtractorSet, error)
func (*Store) CreateRuleset ¶
func (s *Store) CreateRuleset(name string, rules []customtests.TestRule) (*customtests.Ruleset, error)
func (*Store) DeleteAPIKey ¶
func (*Store) DeleteExtractorSet ¶ added in v0.3.0
func (*Store) DeleteGSCConnection ¶
func (*Store) DeleteProject ¶
func (*Store) DeleteProviderConnection ¶
func (*Store) DeleteRuleset ¶
func (*Store) GetExtractorSet ¶ added in v0.3.0
func (s *Store) GetExtractorSet(id string) (*extraction.ExtractorSet, error)
func (*Store) GetGSCConnection ¶
func (s *Store) GetGSCConnection(projectID string) (*GSCConnection, error)
func (*Store) GetProviderConnection ¶
func (s *Store) GetProviderConnection(projectID, provider string) (*providers.ProviderConnection, error)
func (*Store) GetRuleset ¶
func (s *Store) GetRuleset(id string) (*customtests.Ruleset, error)
func (*Store) ListAPIKeys ¶
func (*Store) ListExtractorSets ¶ added in v0.3.0
func (s *Store) ListExtractorSets() ([]extraction.ExtractorSet, error)
func (*Store) ListGSCConnections ¶
func (s *Store) ListGSCConnections() ([]GSCConnection, error)
func (*Store) ListProjects ¶
func (*Store) ListProjectsPaginated ¶
func (*Store) ListProviderConnections ¶
func (s *Store) ListProviderConnections(projectID string) ([]providers.ProviderConnection, error)
func (*Store) ListRulesets ¶
func (s *Store) ListRulesets() ([]customtests.Ruleset, error)
func (*Store) RenameProject ¶
func (*Store) SaveGSCConnection ¶
func (s *Store) SaveGSCConnection(conn *GSCConnection) error
func (*Store) SaveProviderConnection ¶
func (s *Store) SaveProviderConnection(conn *providers.ProviderConnection) error
func (*Store) UpdateExtractorSet ¶ added in v0.3.0
func (s *Store) UpdateExtractorSet(id, name string, extractors []extraction.Extractor) error
func (*Store) UpdateRuleset ¶
func (s *Store) UpdateRuleset(id, name string, rules []customtests.TestRule) error
func (*Store) ValidateKey ¶
func (s *Store) ValidateKey(rawKey string) *KeyLookupResult
Click to show internal directories.
Click to hide internal directories.