database

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package database is a database interface to authorized apps.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthorizedAppDB

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

func New

func New(db *database.DB) *AuthorizedAppDB

func (*AuthorizedAppDB) DeleteAuthorizedApp

func (aa *AuthorizedAppDB) DeleteAuthorizedApp(ctx context.Context, name string) error

func (*AuthorizedAppDB) GetAuthorizedApp

func (aa *AuthorizedAppDB) GetAuthorizedApp(ctx context.Context, name string) (*model.AuthorizedApp, error)

GetAuthorizedApp loads a single AuthorizedApp for the given name. If no row exists, this returns nil.

func (*AuthorizedAppDB) InsertAuthorizedApp

func (aa *AuthorizedAppDB) InsertAuthorizedApp(ctx context.Context, m *model.AuthorizedApp) error

func (*AuthorizedAppDB) ListAuthorizedApps

func (aa *AuthorizedAppDB) ListAuthorizedApps(ctx context.Context) ([]*model.AuthorizedApp, error)

func (*AuthorizedAppDB) UpdateAuthorizedApp

func (aa *AuthorizedAppDB) UpdateAuthorizedApp(ctx context.Context, priorKey string, m *model.AuthorizedApp) error

Jump to

Keyboard shortcuts

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