api

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2023 License: BSD-3-Clause-LBNL Imports: 10 Imported by: 0

README

Everything in here is intended implemented due to limitations or bugs found.

Currently, the /api/health is not documented via swagger therefore the extended API provides that functionality.

The /api/users is documented incorrectly and mapped to the wrong response type, so for the time being relying on a custom implementation to derive the same functionality.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExtendedApi

type ExtendedApi struct {
	// contains filtered or unexported fields
}

func NewExtendedApi

func NewExtendedApi() *ExtendedApi

func (*ExtendedApi) AddConnectionPermission added in v0.5.0

func (extended *ExtendedApi) AddConnectionPermission(p *datasource_permissions.AddPermissionParams) error

AddConnectionPermission adds permission to a given data source Notes: The Swagger spec is incorrect. It lists all parameters as query parameters while they should actually be passed in as part of the JSON body.

func (*ExtendedApi) Health

func (extended *ExtendedApi) Health() (*HealthResponse, error)

func (*ExtendedApi) ListTokens

func (extended *ExtendedApi) ListTokens(query *service_accounts.ListTokensParams) ([]*models.TokenDTO, error)

func (*ExtendedApi) SearchUsers

func (extended *ExtendedApi) SearchUsers(query *users.SearchUsersParams) ([]*models.UserSearchHitDTO, error)

type HealthResponse

type HealthResponse struct {
	Commit   string `json:"commit,omitempty"`
	Database string `json:"database,omitempty"`
	Version  string `json:"version,omitempty"`
}

type ServiceAccountDTOWithTokens

type ServiceAccountDTOWithTokens struct {
	ServiceAccount *models.ServiceAccountDTO
	Tokens         []*models.TokenDTO
}

Jump to

Keyboard shortcuts

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