custos

package
v0.0.0-...-929fc3c Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client wraps the Custos gRPC client

func NewClient

func NewClient(endpoint string) (*Client, error)

NewClient creates a new Custos gRPC client

func (*Client) Close

func (c *Client) Close() error

Close closes the gRPC connection

func (*Client) GetUser

func (c *Client) GetUser(ctx context.Context, userID uint) (*custosv1.User, error)

GetUser retrieves user information by user ID

func (*Client) ValidateToken

func (c *Client) ValidateToken(ctx context.Context, token string) (*TokenValidationResult, error)

ValidateToken validates a JWT token via Custos

type TokenValidationResult

type TokenValidationResult struct {
	IsValid      bool
	UserID       uint
	Username     string
	Email        string
	TenantID     uint
	UserType     string
	ErrorMessage string
}

TokenValidationResult represents the result of token validation

Jump to

Keyboard shortcuts

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