Documentation ¶
Index ¶
- type Session
- func (session *Session) BasicLogin(username string, password string) error
- func (session *Session) Client() gateway.GatewayAPIClient
- func (session *Session) Context() context.Context
- func (session *Session) GetLoginMethods() ([]string, error)
- func (session *Session) Initiate(host string, insecure bool) error
- func (session *Session) IsValid() bool
- func (session *Session) Login(method string, username string, password string) error
- func (session *Session) NewHTTPRequest(endpoint string, method string, transportToken string, data io.Reader) (*net.HTTPRequest, error)
- func (session *Session) Token() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
Session stores information about a Reva session. It is also responsible for managing the Reva gateway client.
func MustNewSession ¶
func MustNewSession() *Session
MustNewSession creates a new session and panics on failure.
func NewSession ¶
NewSession creates a new Reva session using a default background context.
func NewSessionWithContext ¶
NewSessionWithContext creates a new Reva session using the provided context.
func (*Session) BasicLogin ¶
BasicLogin tries to log into Reva using basic authentication. Before the actual login attempt, the method verifies that the Reva instance does support the "basic" login method.
func (*Session) Client ¶
func (session *Session) Client() gateway.GatewayAPIClient
Client gets the gateway client instance.
func (*Session) GetLoginMethods ¶
GetLoginMethods returns a list of all available login methods supported by the Reva instance.
func (*Session) Initiate ¶
Initiate initiates the session by creating a connection to the host and preparing the gateway client.
func (*Session) IsValid ¶
IsValid checks whether the session has been initialized and fully established.