MCPcopy Create free account
hub / github.com/clouditor/clouditor / NewSession

Function NewSession

cli/session.go:89–102  ·  view source on GitHub ↗
(url string, config *oauth2.Config, token *oauth2.Token)

Source from the content-addressed store, hash-verified

87}
88
89func NewSession(url string, config *oauth2.Config, token *oauth2.Token) (session *Session, err error) {
90 session = &Session{
91 URL: url,
92 Folder: viper.GetString(SessionFolderFlag),
93 authorizer: api.NewOAuthAuthorizerFromConfig(config, token),
94 Config: config,
95 }
96
97 if session.ClientConn, err = grpc.NewClient(session.URL, api.DefaultGrpcDialOptions(url, session)...); err != nil {
98 return nil, fmt.Errorf("could not connect: %w", err)
99 }
100
101 return session, nil
102}
103
104func ContinueSession() (session *Session, err error) {
105 var (

Callers 2

NewLoginCommandFunction · 0.92
PrepareSessionFunction · 0.92

Calls 3

DefaultGrpcDialOptionsFunction · 0.92
ErrorfMethod · 0.80

Tested by

no test coverage detected