From 74e36f0ead717105f26087c2cab08b41ba5a7ce8 Mon Sep 17 00:00:00 2001 From: jwijenbergh Date: Mon, 12 Feb 2024 19:18:05 +0100 Subject: All: Document everything to pass revive lint --- internal/server/institute.go | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'internal/server/institute.go') diff --git a/internal/server/institute.go b/internal/server/institute.go index 881f96d..aa032c7 100644 --- a/internal/server/institute.go +++ b/internal/server/institute.go @@ -11,6 +11,11 @@ import ( "github.com/jwijenbergh/eduoauth-go" ) +// AddInstitute adds an institute access server +// `ctx` is the context used for cancellation +// `disco` are the discovery servers +// `id` is the identifier for the server, the base url +// `na` is true when authorization should not be triggered func (s *Servers) AddInstitute(ctx context.Context, disco *discovery.Discovery, id string, na bool) (*Server, error) { // This is basically done to double check if the server is part of the institute access section of disco dsrv, err := disco.ServerByURL(id, "institute_access") @@ -43,6 +48,12 @@ func (s *Servers) AddInstitute(ctx context.Context, disco *discovery.Discovery, return &inst, nil } +// GetInstitute gets an institute access server +// `ctx` is the context used for cancellation +// `id` is the identifier for the server, the base url +// `disco` are the discovery servers +// `tok` are the tokens such that we do not have to trigger auth +// `disableAuth` is true when auth should never be triggered func (s *Servers) GetInstitute(ctx context.Context, id string, disco *discovery.Discovery, tok *eduoauth.Token, disableAuth bool) (*Server, error) { // This is basically done to double check if the server is part of the institute access section of disco dsrv, err := disco.ServerByURL(id, "institute_access") -- cgit v1.2.3