cmd

package
v3.0.0-alpha3.0...-6a1f075 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2025 License: BSD-3-Clause Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const DEV_API_SERVER string = "https://dacat-development.psi.ch/api/v3"
View Source
const DEV_RSYNC_ARCHIVE_SERVER string = "arematest2in.psi.ch"
View Source
const LOCAL_API_SERVER string = "http://backend.localhost/api/v3"
View Source
const LOCAL_RSYNC_ARCHIVE_SERVER string = "localhost"
View Source
const MANUAL = "http://melanie.gitpages.psi.ch/SciCatPages"
View Source
const PROD_API_SERVER string = "https://dacat.psi.ch/api/v3"
View Source
const PROD_RSYNC_ARCHIVE_SERVER string = "pb-archive.psi.ch"
View Source
const PUBLISHServer string = "doi2.psi.ch"
View Source
const RETRIEVELocation string = "/data/archiveManager/retrieve/"
View Source
const TEST_API_SERVER string = "https://dacat-qa.psi.ch/api/v3"
View Source
const TEST_RSYNC_ARCHIVE_SERVER string = "pbt-archive.psi.ch"
View Source
const TUNNEL_API_SERVER string = "https://dacat-development.psi.ch:5443/api/v3"
View Source
const TUNNEL_RSYNC_ARCHIVE_SERVER string = "arematest2in.psi.ch:2022"

Variables

View Source
var VERSION string

Functions

func Execute

func Execute()

Types

type Authenticator

type Authenticator interface {
	AuthenticateUser(httpClient *http.Client, APIServer string, username string, password string) (map[string]string, []string, error)
	GetUserInfoFromToken(httpClient *http.Client, APIServer string, token string) (map[string]string, []string, error)
}

An interface with the methods so that we can mock them in tests

type RealAuthenticator

type RealAuthenticator struct{}

func (RealAuthenticator) AuthenticateUser

func (r RealAuthenticator) AuthenticateUser(httpClient *http.Client, APIServer string, username string, password string) (map[string]string, []string, error)

func (RealAuthenticator) GetUserInfoFromToken

func (r RealAuthenticator) GetUserInfoFromToken(httpClient *http.Client, APIServer string, token string) (map[string]string, []string, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳