user

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: May 27, 2026 License: Apache-2.0 Imports: 19 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	// NgcRequestStatusSuccess is the code present in successful request status
	NgcRequestStatusSuccess = "SUCCESS"
)

Variables

This section is empty.

Functions

func GetOrgData

func GetOrgData(ngcUser *NgcUser) cdbm.OrgData

GetOrgData returns the NGC org data from the user

Types

type ManageUser

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

ManageUser is an activity wrapper for updating user that allows injecting DB access

func NewManageUser

func NewManageUser(dbSession *cdb.Session, cfg *config.Config) ManageUser

NewManageUser returns a new user management activity wrapper

func (ManageUser) CreateOrUpdateUserInDBWithAuxiliaryID

func (mu ManageUser) CreateOrUpdateUserInDBWithAuxiliaryID(ctx context.Context, ngcUser *NgcUser) error

CreateOrUpdateUserInDBWithAuxiliaryID updates user data in DB from NGC user data

func (ManageUser) GetUserDataFromNgc

func (mu ManageUser) GetUserDataFromNgc(ctx context.Context, userID uuid.UUID, encryptedNgcToken []byte) (*NgcUser, error)

GetUserDataFromNgc is a Temporal activity that verifies that a connection to a K8s cluster API can be established

func (ManageUser) GetUserDataFromNgcWithAuxiliaryID

func (mu ManageUser) GetUserDataFromNgcWithAuxiliaryID(ctx context.Context, auxiliaryID string, encryptedNgcToken []byte) (*NgcUser, error)

GetUserDataFromNgcWithAuxiliaryID is a Temporal activity that verifies that a connection to a K8s cluster API

func (ManageUser) UpdateUserInDB

func (mu ManageUser) UpdateUserInDB(ctx context.Context, userID uuid.UUID, ngcUser *NgcUser) error

UpdateUserInDB updates user data in DB from NGC user data

type NgcOrg

type NgcOrg struct {
	ID          int    `json:"id"`
	Name        string `json:"name"`
	DisplayName string `json:"displayName"`
	OrgType     string `json:"type"`
	Description string `json:"description"`
}

NgcOrg captures attributes for NGC organizations

type NgcOrgRole

type NgcOrgRole struct {
	Org       NgcOrg   `json:"org"`
	Team      *NgcTeam `json:"team"`
	OrgRoles  []string `json:"orgRoles"`
	TeamRoles []string `json:"teamRoles"`
}

NgcOrgRole captures attributes for organization roles user has within NGC

type NgcRequestStatus

type NgcRequestStatus struct {
	StatusCode string `json:"statusCode"`
	RequestID  string `json:"requestId"`
}

NgcRequestStatus captures status of the request

type NgcTeam

type NgcTeam struct {
	ID        int    `json:"id"`
	Name      string `json:"name"`
	TeamType  string `json:"type"`
	IsDeleted bool   `json:"isDeleted"`
}

NgcTeam captures attributes for NGC teams

type NgcUser

type NgcUser struct {
	Email       string       `json:"email"`
	ClientID    string       `json:"clientId"`
	StarfleetID string       `json:"starfleetId"`
	Name        string       `json:"name"`
	Roles       []NgcOrgRole `json:"roles"`
}

NgcUser captures NGC user data

type NgcUserResponse

type NgcUserResponse struct {
	RequestStatus NgcRequestStatus `json:"requestStatus"`
	User          NgcUser          `json:"user"`
}

NgcUserResponse captures response data returned by NGC API user endpoint

Jump to

Keyboard shortcuts

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