apiserver

package
v0.0.0-...-a74cfd7 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2020 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Start

func Start(config *Config) error

Start ...

Types

type Config

type Config struct {
	BindAddress string `toml:"bind_address"`
	LogLevel    string `toml:"log_level"`
	DatabaseURL string `toml:"database_url"`
	SessionKey  string `toml:"session_key"`
}

Config ...

func NewConfig

func NewConfig() *Config

NewConfig ...

type CustomClaims

type CustomClaims struct {
	Scope string `json:"scope"`
	jwt.StandardClaims
}

CustomClaims ...

type JSONWebKeys

type JSONWebKeys struct {
	Kty string   `json:"kty"`
	Kid string   `json:"kid"`
	Use string   `json:"use"`
	N   string   `json:"n"`
	E   string   `json:"e"`
	X5c []string `json:"x5c"`
}

JSONWebKeys ...

type Jwks

type Jwks struct {
	Keys []JSONWebKeys `json:"keys"`
}

Jwks ...

type Server

type Server struct {
	ReadTimeout  time.Duration
	WriteTimeout time.Duration
	IdleTimeout  time.Duration
	TLSConfig    *tls.Config
	// contains filtered or unexported fields
}

Server ...

func NewServer

func NewServer(store store.Store, sessionStore sessions.Store) *Server

NewServer ...

func (*Server) HandleAddOrganizationToMyList

func (s *Server) HandleAddOrganizationToMyList(c *gin.Context)

HandleAddOrganizationToMyList ...

func (*Server) HandleCreateGrant

func (s *Server) HandleCreateGrant(c *gin.Context)

HandleCreateGrant creates grant by provided information

func (*Server) HandleCreatePolicy

func (s *Server) HandleCreatePolicy(c *gin.Context)

HandleCreatePolicy creates policy by provided information

func (*Server) HandleCreateReceipt

func (s *Server) HandleCreateReceipt(c *gin.Context)

HandleCreateReceipt creates receipt by provided information

func (*Server) HandleCreateVaccine

func (s *Server) HandleCreateVaccine(c *gin.Context)

HandleCreateVaccine creates vaccine using Vaccine model

func (*Server) HandleDeactivateEthereumAccount

func (s *Server) HandleDeactivateEthereumAccount(c *gin.Context)

HandleDeactivateEthereumAccount deactivates accounts

func (*Server) HandleDeactivateNucypherAccount

func (s *Server) HandleDeactivateNucypherAccount(c *gin.Context)

HandleDeactivateNucypherAccount deactivates accounts

func (*Server) HandleDeleteOrganization

func (s *Server) HandleDeleteOrganization(c *gin.Context)

HandleDeleteOrganization deletes organization from connected organizations list

func (*Server) HandleEthereumAccountCreate

func (s *Server) HandleEthereumAccountCreate(c *gin.Context)

HandleAccountCreate ...

func (*Server) HandleFindOrganizations

func (s *Server) HandleFindOrganizations(c *gin.Context)

HandleFindOrganizations ...

func (*Server) HandleGenomeCreate

func (s *Server) HandleGenomeCreate(c *gin.Context)

HandleGenomeCreate ...

func (*Server) HandleGetCompletedGrantsForMe

func (s *Server) HandleGetCompletedGrantsForMe(c *gin.Context)

HandleGetCompletedGrantsForMe returns completed grants

func (*Server) HandleGetConnectedOrganizations

func (s *Server) HandleGetConnectedOrganizations(c *gin.Context)

HandleGetConnectedOrganizations ...

func (*Server) HandleGetEthereumAccountForOrganization

func (s *Server) HandleGetEthereumAccountForOrganization(c *gin.Context)

HandleGetEthereumAccountForOrganization returns all nucypher accounts for organization

func (*Server) HandleGetEthereumAccounts

func (s *Server) HandleGetEthereumAccounts(c *gin.Context)

HandleGetEthereumAccounts returns all tezos accounts for user

func (*Server) HandleGetGenomes

func (s *Server) HandleGetGenomes(c *gin.Context)

HandleGetGenomes returns all viruses from database

func (*Server) HandleGetGenomesByOrganization

func (s *Server) HandleGetGenomesByOrganization(c *gin.Context)

HandleGetGenomesByOrganization returns all genomes for specific virus

func (*Server) HandleGetGenomesByVaccine

func (s *Server) HandleGetGenomesByVaccine(c *gin.Context)

func (*Server) HandleGetGenomesByVirus

func (s *Server) HandleGetGenomesByVirus(c *gin.Context)

HandleGetGenomesByVirus returns all genomes for specific virus

func (*Server) HandleGetGrantsForMe

func (s *Server) HandleGetGrantsForMe(c *gin.Context)

GetGrantsForMe returns grants available for submit

func (*Server) HandleGetMyGenomes

func (s *Server) HandleGetMyGenomes(c *gin.Context)

HandleGetMyGenomes returns all viruses created by this user

func (*Server) HandleGetMyProfile

func (s *Server) HandleGetMyProfile(c *gin.Context)

HandleGetMyProfile ...

func (*Server) HandleGetNucypherAccountForOrganization

func (s *Server) HandleGetNucypherAccountForOrganization(c *gin.Context)

HandleGetNucypherAccountForOrganization returns all nucypher accounts for organization

func (*Server) HandleGetNucypherAccounts

func (s *Server) HandleGetNucypherAccounts(c *gin.Context)

HandleGetNucypherAccounts returns all tezos accounts for user

func (*Server) HandleGetOrganization

func (s *Server) HandleGetOrganization(c *gin.Context)

HandleGetOrganization ...

func (*Server) HandleGetOrganizations

func (s *Server) HandleGetOrganizations(c *gin.Context)

HandleGetOrganizations ...

func (*Server) HandleGetPolicyByID

func (s *Server) HandleGetPolicyByID(c *gin.Context)

HandleGetPolicyByID returns specific policy information

func (*Server) HandleGetPolicyByLabel

func (s *Server) HandleGetPolicyByLabel(c *gin.Context)

HandleGetPolicyByLabel returns specific receipt data

func (*Server) HandleGetReceiptByHash

func (s *Server) HandleGetReceiptByHash(c *gin.Context)

HandleGetReceiptByHash returns specific receipt data

func (*Server) HandleGetReceiptByID

func (s *Server) HandleGetReceiptByID(c *gin.Context)

HandleGetReceiptByID returns specific receipt data

func (*Server) HandleGetRecievedTransactions

func (s *Server) HandleGetRecievedTransactions(c *gin.Context)

HandleGetRecievedTransactions ...

func (*Server) HandleGetSendTransactions

func (s *Server) HandleGetSendTransactions(c *gin.Context)

HandleGetSendTransactions ...

func (*Server) HandleGetTransactions

func (s *Server) HandleGetTransactions(c *gin.Context)

HandleGetTransactions ...

func (*Server) HandleGetVaccineByID

func (s *Server) HandleGetVaccineByID(c *gin.Context)

HandleGetVirus ...

func (*Server) HandleGetVaccines

func (s *Server) HandleGetVaccines(c *gin.Context)

HandleGetVaccines returns all vaccines from database

func (*Server) HandleGetVirusByID

func (s *Server) HandleGetVirusByID(c *gin.Context)

HandleGetVirus ...

func (*Server) HandleGetViruses

func (s *Server) HandleGetViruses(c *gin.Context)

HandleGetViruses returns all viruses from database

func (*Server) HandleMakeEthereumAccountPrivate

func (s *Server) HandleMakeEthereumAccountPrivate(c *gin.Context)

HandleMakeEthereumAccountPrivate makes tezos accounts private

func (*Server) HandleMakeEthereumAccountUnprivate

func (s *Server) HandleMakeEthereumAccountUnprivate(c *gin.Context)

HandleMakeEthereumAccountUnprivate makes tezos accounts public

func (*Server) HandleMakeNucypherAccountPrivate

func (s *Server) HandleMakeNucypherAccountPrivate(c *gin.Context)

HandleMakeNucypherAccountPrivate makes tezos accounts private

func (*Server) HandleMakeNucypherAccountUnprivate

func (s *Server) HandleMakeNucypherAccountUnprivate(c *gin.Context)

HandleMakeNucypherAccountUnprivate makes tezos accounts public

func (*Server) HandleNucypherAccountCreate

func (s *Server) HandleNucypherAccountCreate(c *gin.Context)

HandleAccountCreate ...

func (*Server) HandleProfileCreate

func (s *Server) HandleProfileCreate(c *gin.Context)

HandleProfileCreate ...

func (*Server) HandleReactivateEthereumAccount

func (s *Server) HandleReactivateEthereumAccount(c *gin.Context)

HandleReactivateEthereumAccount activates accounts

func (*Server) HandleReactivateNucypherAccount

func (s *Server) HandleReactivateNucypherAccount(c *gin.Context)

HandleReactivateNucypherAccount activates accounts

func (*Server) HandleSubmitGrant

func (s *Server) HandleSubmitGrant(c *gin.Context)

HandleSubmitGrant allow user submit grant

func (*Server) HandleTransactionCreate

func (s *Server) HandleTransactionCreate(c *gin.Context)

HandleTransactionCreate ...

func (*Server) HandleUpdateEthereumAccount

func (s *Server) HandleUpdateEthereumAccount(c *gin.Context)

HandleUpdateEthereumAccount allow user update account name

func (*Server) HandleUpdateEthereumAccountAddress

func (s *Server) HandleUpdateEthereumAccountAddress(c *gin.Context)

HandleUpdateEthereumAccountAddress allow user update account address

func (*Server) HandleUpdateNucypherAccount

func (s *Server) HandleUpdateNucypherAccount(c *gin.Context)

HandleUpdateNucypherAccount allow user update account name

func (*Server) HandleUpdateNucypherAccountAddress

func (s *Server) HandleUpdateNucypherAccountAddress(c *gin.Context)

HandleUpdateNucypherAccount allow user update account address

func (*Server) HandleUpdateNucypherAccountVerifyingKey

func (s *Server) HandleUpdateNucypherAccountVerifyingKey(c *gin.Context)

HandleUpdateNucypherAccountVerifyingKey allow user update account verifying key

func (*Server) HandleUpdateProfile

func (s *Server) HandleUpdateProfile(c *gin.Context)

HandleUpdateProfile changes account data in database

func (*Server) HandleUpdateVaccineAmount

func (s *Server) HandleUpdateVaccineAmount(c *gin.Context)

HandleUpdateVaccineAmount updates vaccine's funded amount

func (*Server) HandleUpdateVaccineDescription

func (s *Server) HandleUpdateVaccineDescription(c *gin.Context)

HandleUpdateVaccineDescription updates vaccine's description

func (*Server) HandleUpdateVaccineName

func (s *Server) HandleUpdateVaccineName(c *gin.Context)

HandleUpdateVaccineName updates vaccine's name

func (*Server) HandleUpdateVirus

func (s *Server) HandleUpdateVirus(c *gin.Context)

HandleUpdateVirus allow user update virus information

func (*Server) HandleVirusCreate

func (s *Server) HandleVirusCreate(c *gin.Context)

HandleVirusCreate ...

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP ...

func (*Server) SetRequestID

func (s *Server) SetRequestID() gin.HandlerFunc

SetRequestID ...

Jump to

Keyboard shortcuts

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