api

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAuthenticatedHTTPClient

func NewAuthenticatedHTTPClient(ctx context.Context, apiBaseURL string) (*http.Client, error)

NewAuthenticatedHTTPClient returns an HTTP client that sends the saved LibOps credential.

Types

type AccountUpdate

type AccountUpdate struct {
	Name           *string `json:"name,omitempty"`
	GithubUsername *string `json:"github_username,omitempty"`
}

AccountUpdate contains self-service account fields.

type CurrentAccount

type CurrentAccount struct {
	ID             string `json:"id"`
	Email          string `json:"email"`
	Name           string `json:"name"`
	GithubUsername string `json:"github_username"`
	VaultEntityID  string `json:"vault_entity_id"`
	IdentityKind   string `json:"identity_kind"`
}

CurrentAccount is the authenticated account returned by /auth/me.

func GetCurrentAccount

func GetCurrentAccount(ctx context.Context, apiBaseURL string) (*CurrentAccount, error)

GetCurrentAccount returns the authenticated LibOps account.

func UpdateCurrentAccount

func UpdateCurrentAccount(ctx context.Context, apiBaseURL string, update AccountUpdate) (*CurrentAccount, error)

UpdateCurrentAccount updates editable account fields for the authenticated user.

type LibopsAPIClient

LibopsAPIClient holds all the service clients

func NewLibopsAPIClient

func NewLibopsAPIClient(ctx context.Context, apiBaseURL string) (*LibopsAPIClient, error)

NewLibopsAPIClient creates and returns a new LibopsAPIClient instance. It initializes all necessary service clients with authentication.

Jump to

Keyboard shortcuts

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