oauthinforepo

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: May 3, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ProviderSet provides an OAuthInfoRepo for use in production.
	ProviderSet = wire.NewSet(Provide, wire.Bind(new(domain.OAuthInfoRepository), new(*OAuthInfoRepo)))
)

Functions

This section is empty.

Types

type OAuthInfoRepo

type OAuthInfoRepo struct {
	DB *gorm.DB
}

OAuthInfoRepo is a repository that holds information about OAuthInfos backed by a database.

func Provide

func Provide(manager *database.Manager) *OAuthInfoRepo

Provide provides an OAuthInfoRepo configured by the given Manager.

func (*OAuthInfoRepo) Create

func (o *OAuthInfoRepo) Create(oauthToken *domain.OAuthInfo) (uint, error)

Create creates the given OAuthInfo in the database.

func (*OAuthInfoRepo) Delete

func (o *OAuthInfoRepo) Delete(ID uint) error

Delete deletes the OAuthInfo with the given ID.

func (*OAuthInfoRepo) GetAll

func (o *OAuthInfoRepo) GetAll() ([]*domain.OAuthInfo, error)

GetAll gets all of the OAuthInfos in the database.

func (*OAuthInfoRepo) GetAllByMeetingPlatformID

func (o *OAuthInfoRepo) GetAllByMeetingPlatformID(ID uint) ([]*domain.OAuthInfo, error)

GetAllByMeetingPlatformID retrieves all OAuthInfos based on the given MeetingPlatform ID.

func (*OAuthInfoRepo) GetAllByUserID

func (o *OAuthInfoRepo) GetAllByUserID(userID uint) ([]*domain.OAuthInfo, error)

GetAllByUserID retrieves all OAuthInfos based on the given User ID.

func (*OAuthInfoRepo) GetByID

func (o *OAuthInfoRepo) GetByID(ID uint) (*domain.OAuthInfo, error)

GetByID retrieves an OAuthInfo based on the given ID.

func (*OAuthInfoRepo) GetByUserIDAndMeetingPlatformID

func (o *OAuthInfoRepo) GetByUserIDAndMeetingPlatformID(userID uint, meetingPlatformID uint) (*domain.OAuthInfo, error)

GetByUserIDAndMeetingPlatformID retrieves the OAuthInfo by the given User ID and MeetingPlatform ID.

func (*OAuthInfoRepo) Update

func (o *OAuthInfoRepo) Update(oauthToken *domain.OAuthInfo) error

Update updates the given OAuthInfo. The ID of the given OAuthInfo needs to be set in order to find the existing record in the database.

Jump to

Keyboard shortcuts

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