crud

package
v0.0.0-...-cee479c Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2021 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyIntegration

func CopyIntegration(integration *resource.Integration) *model.Integration

CopyIntegration copies integration from one struct to another.

func CopyPreferences

func CopyPreferences(preferences *resource.Preferences) *model.Preferences

CopyPreferences copies preferences from one struct to another.

func CopyProfile

func CopyProfile(profile *resource.Profile) *model.Profile

CopyProfile copies profile from one struct to another.

func CreateIntegration

func CreateIntegration(ctx context.Context, app *inits.App, integrationInput *model.IntegrationInput) (*model.Integration, error)

CreateIntegration creates a new integration in the database.

func GetIntegration

func GetIntegration(_ context.Context, app *inits.App, integrationID *string) (*model.Integration, error)

GetIntegration gets an existing integration from the database.

func GetPreferences

func GetPreferences(_ context.Context, app *inits.App, preferencesID *string) (*model.Preferences, error)

GetPreferences gets an existing preferences from the database.

func GetSessionUser

func GetSessionUser(ctx context.Context, app *inits.App) (*model.SessionUser, error)

GetSessionUser get the session user main details.

func GetSessionUserPreferences

func GetSessionUserPreferences(_ context.Context, app *inits.App, userID *string) (*model.Preferences, error)

GetSessionUserPreferences gets user's preferences from the database. Dataloader is not needed for this because there is really only going to be one session user.

func UpdateProfile

func UpdateProfile(_ context.Context, app *inits.App, profileID *string, profileInput *model.ProfileInput) (*model.Profile, error)

UpdateProfile updates an existing profile from the database.

func UploadIntegrationAvatar

func UploadIntegrationAvatar(_ context.Context, app *inits.App, integrationID *string, file *graphql.Upload) (*string, error)

UploadIntegrationAvatar uploads the avatar of an associated integration.

func UploadProfileAvatar

func UploadProfileAvatar(_ context.Context, app *inits.App, profileID *string, file *graphql.Upload) (*string, error)

UploadProfileAvatar uploads the avatar of an associated profile.

Types

This section is empty.

Jump to

Keyboard shortcuts

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