gorm

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

@Time : 2019-08-27 14:22 @Author : zr

@Time : 2019-08-27 14:42 @Author : zr

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Role

type Role model.Role

func (Role) TableName

func (Role) TableName() string

type Service

type Service model.Service

func (Service) TableName

func (Service) TableName() string

type ServiceRoleRelation

type ServiceRoleRelation struct {
	ServiceName string
	RoleName    string
}

func (ServiceRoleRelation) TableName

func (ServiceRoleRelation) TableName() string

type Storage

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

func NewStorage

func NewStorage(gorm *gorm2.DB) *Storage

func (*Storage) RoleCreate added in v1.1.0

func (s *Storage) RoleCreate(role *model.Role) (err error)

func (*Storage) RoleDelete added in v1.1.0

func (s *Storage) RoleDelete(name string) (err error)

func (*Storage) RoleUpdate added in v1.1.0

func (s *Storage) RoleUpdate(role *model.Role) (err error)

func (*Storage) ServiceCreate added in v1.1.0

func (s *Storage) ServiceCreate(service *model.Service) (err error)

func (*Storage) ServiceDelete added in v1.1.0

func (s *Storage) ServiceDelete(servicePath string) (err error)

func (*Storage) ServiceUpdate added in v1.1.0

func (s *Storage) ServiceUpdate(service *model.Service) (err error)

func (*Storage) Sync

func (s *Storage) Sync(memory *model.Memory) (err error)

func (*Storage) UpdateRelation added in v1.1.0

func (s *Storage) UpdateRelation(role *model.Role, services []*model.Service) (err error)

Directories

Path Synopsis
test
mysql
@Time : 2019-08-27 14:30 @Author : zr
@Time : 2019-08-27 14:30 @Author : zr
pg
@Time : 2019-08-27 14:30 @Author : zr
@Time : 2019-08-27 14:30 @Author : zr

Jump to

Keyboard shortcuts

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