userinfo

package
v1.10.2 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2025 License: Apache-2.0 Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*up.Config
}

Client is a user info client.

func NewClient

func NewClient(cfg *up.Config) *Client

NewClient builds a user info client from the passed config.

func (*Client) Get

func (c *Client) Get(ctx context.Context) (*GetResponse, error)

Get gets user information on Upbound.

type GetResponse

type GetResponse struct {
	Features []string `json:"features"`
	User     User     `json:"user"`
}

GetResponse is information about a user on Upbound.

type User

type User struct {
	ID        uint       `json:"id"`
	Username  string     `json:"username"`
	FirstName string     `json:"firstName"`
	LastName  string     `json:"lastName"`
	Email     string     `json:"email,omitempty"`
	Biography string     `json:"biography,omitempty"`
	Location  string     `json:"location,omitempty"`
	CreatedAt *time.Time `json:"createdAt,omitempty"`
	UpdatedAt *time.Time `json:"updatedAt,omitempty"`
	DeletedAt *time.Time `json:"deletedAt,omitempty"`
}

User is a user on Upbound.

Jump to

Keyboard shortcuts

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