apiv1

package
v0.0.0-...-a51df50 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2019 License: MPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIv1

type APIv1 struct {
	// contains filtered or unexported fields
}

func NewAPI

func NewAPI(DB *db.DB) APIv1

func (*APIv1) Add

func (api *APIv1) Add(w http.ResponseWriter, r *http.Request)

func (*APIv1) CheckApikey

func (api *APIv1) CheckApikey(ApiKey string) bool

func (*APIv1) CreateApiKey

func (api *APIv1) CreateApiKey(userID, AppName string) Apikey

func (*APIv1) GetUserIDbyApiKey

func (api *APIv1) GetUserIDbyApiKey(ApiKey string) string

func (*APIv1) Get_new_api_key

func (api *APIv1) Get_new_api_key(w http.ResponseWriter, r *http.Request)

func (*APIv1) Index

func (api *APIv1) Index(w http.ResponseWriter, r *http.Request)

func (*APIv1) List

func (api *APIv1) List(w http.ResponseWriter, r *http.Request)

func (*APIv1) Login

func (api *APIv1) Login(w http.ResponseWriter, r *http.Request)

func (*APIv1) Logout

func (api *APIv1) Logout(w http.ResponseWriter, r *http.Request)

func (*APIv1) Lookup

func (api *APIv1) Lookup(w http.ResponseWriter, r *http.Request)

func (*APIv1) Register

func (api *APIv1) Register(w http.ResponseWriter, r *http.Request)

func (*APIv1) Remove

func (api *APIv1) Remove(w http.ResponseWriter, r *http.Request)

func (*APIv1) Update

func (api *APIv1) Update(w http.ResponseWriter, r *http.Request)

func (*APIv1) UserRemove

func (api *APIv1) UserRemove(w http.ResponseWriter, r *http.Request)

type Apikey

type Apikey struct {
	ObjID   primitive.ObjectID `json:"id" bson:"_id,omitempty"`
	USER_ID string             `bson:"USER_ID"`
	KEY     string             `bson:"KEY"`
}

func FindAPIKeyOne

func FindAPIKeyOne(query bson.D, database *db.DB) Apikey

Jump to

Keyboard shortcuts

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