iamexampledb

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: May 17, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BatchGetIamPolicyBindingsRowsQuery

type BatchGetIamPolicyBindingsRowsQuery struct {
	Keys []IamPolicyBindingsKey
}

type BatchGetLineItemsRowsQuery

type BatchGetLineItemsRowsQuery struct {
	Keys []LineItemsKey
}

type BatchGetShipmentsRowsQuery

type BatchGetShipmentsRowsQuery struct {
	Keys      []ShipmentsKey
	LineItems bool
}

type BatchGetShippersRowsQuery

type BatchGetShippersRowsQuery struct {
	Keys []ShippersKey
}

type BatchGetSitesRowsQuery

type BatchGetSitesRowsQuery struct {
	Keys []SitesKey
}

type ColumnDescriptor

type ColumnDescriptor interface {
	ColumnID() spansql.ID
	ColumnName() string
	ColumnType() spansql.Type
	NotNull() bool
	AllowCommitTimestamp() bool
}

type DatabaseDescriptor

type DatabaseDescriptor interface {
	IamPolicyBindings() IamPolicyBindingsTableDescriptor
	Shippers() ShippersTableDescriptor
	Sites() SitesTableDescriptor
	Shipments() ShipmentsTableDescriptor
	LineItems() LineItemsTableDescriptor
	IamPolicyBindingsByMemberAndResource() IamPolicyBindingsByMemberAndResourceIndexDescriptor
	IamPolicyBindingsByMemberAndRole() IamPolicyBindingsByMemberAndRoleIndexDescriptor
}

func Descriptor

func Descriptor() DatabaseDescriptor

type GetIamPolicyBindingsRowQuery

type GetIamPolicyBindingsRowQuery struct {
	Key IamPolicyBindingsKey
}

type GetLineItemsRowQuery

type GetLineItemsRowQuery struct {
	Key LineItemsKey
}

type GetShipmentsRowQuery

type GetShipmentsRowQuery struct {
	Key       ShipmentsKey
	LineItems bool
}

type GetShippersRowQuery

type GetShippersRowQuery struct {
	Key ShippersKey
}

type GetSitesRowQuery

type GetSitesRowQuery struct {
	Key SitesKey
}

type IamPolicyBindingsByMemberAndResourceIndexDescriptor

type IamPolicyBindingsByMemberAndResourceIndexDescriptor interface {
	IndexName() string
	IndexID() spansql.ID
	ColumnNames() []string
	ColumnIDs() []spansql.ID
	ColumnExprs() []spansql.Expr
	Member() ColumnDescriptor
	Resource() ColumnDescriptor
	Role() ColumnDescriptor
}

type IamPolicyBindingsByMemberAndRoleIndexDescriptor

type IamPolicyBindingsByMemberAndRoleIndexDescriptor interface {
	IndexName() string
	IndexID() spansql.ID
	ColumnNames() []string
	ColumnIDs() []spansql.ID
	ColumnExprs() []spansql.Expr
	Member() ColumnDescriptor
	Role() ColumnDescriptor
	Resource() ColumnDescriptor
}

type IamPolicyBindingsKey

type IamPolicyBindingsKey struct {
	Resource     string
	BindingIndex int64
	Role         string
	MemberIndex  int64
	Member       string
}

func (IamPolicyBindingsKey) BoolExpr

func (k IamPolicyBindingsKey) BoolExpr() spansql.BoolExpr

func (IamPolicyBindingsKey) Delete

func (IamPolicyBindingsKey) Order

func (IamPolicyBindingsKey) SpannerKey

func (k IamPolicyBindingsKey) SpannerKey() spanner.Key

func (IamPolicyBindingsKey) SpannerKeySet

func (k IamPolicyBindingsKey) SpannerKeySet() spanner.KeySet

type IamPolicyBindingsRow

type IamPolicyBindingsRow struct {
	Resource     string `spanner:"resource"`
	BindingIndex int64  `spanner:"binding_index"`
	Role         string `spanner:"role"`
	MemberIndex  int64  `spanner:"member_index"`
	Member       string `spanner:"member"`
}

func (*IamPolicyBindingsRow) ColumnExprs

func (*IamPolicyBindingsRow) ColumnExprs() []spansql.Expr

func (*IamPolicyBindingsRow) ColumnIDs

func (*IamPolicyBindingsRow) ColumnIDs() []spansql.ID

func (*IamPolicyBindingsRow) ColumnNames

func (*IamPolicyBindingsRow) ColumnNames() []string

func (*IamPolicyBindingsRow) Key

func (*IamPolicyBindingsRow) Mutate

func (r *IamPolicyBindingsRow) Mutate() (string, []string, []interface{})

func (*IamPolicyBindingsRow) MutateColumns

func (r *IamPolicyBindingsRow) MutateColumns(columns []string) (string, []string, []interface{})

func (*IamPolicyBindingsRow) MutatePresentColumns

func (r *IamPolicyBindingsRow) MutatePresentColumns() (string, []string, []interface{})

func (*IamPolicyBindingsRow) UnmarshalSpannerRow

func (r *IamPolicyBindingsRow) UnmarshalSpannerRow(row *spanner.Row) error

func (*IamPolicyBindingsRow) Validate

func (r *IamPolicyBindingsRow) Validate() error

type IamPolicyBindingsRowIterator

type IamPolicyBindingsRowIterator interface {
	Next() (*IamPolicyBindingsRow, error)
	Do(f func(row *IamPolicyBindingsRow) error) error
	Stop()
}

type IamPolicyBindingsTableDescriptor

type IamPolicyBindingsTableDescriptor interface {
	TableName() string
	TableID() spansql.ID
	ColumnNames() []string
	ColumnIDs() []spansql.ID
	ColumnExprs() []spansql.Expr
	Resource() ColumnDescriptor
	BindingIndex() ColumnDescriptor
	Role() ColumnDescriptor
	MemberIndex() ColumnDescriptor
	Member() ColumnDescriptor
}

type LineItemsKey

type LineItemsKey struct {
	ShipperId  string
	ShipmentId string
	LineNumber int64
}

func (LineItemsKey) BoolExpr

func (k LineItemsKey) BoolExpr() spansql.BoolExpr

func (LineItemsKey) Delete

func (k LineItemsKey) Delete() *spanner.Mutation

func (LineItemsKey) Order

func (LineItemsKey) Order() []spansql.Order

func (LineItemsKey) SpannerKey

func (k LineItemsKey) SpannerKey() spanner.Key

func (LineItemsKey) SpannerKeySet

func (k LineItemsKey) SpannerKeySet() spanner.KeySet

type LineItemsRow

type LineItemsRow struct {
	ShipperId  string  `spanner:"shipper_id"`
	ShipmentId string  `spanner:"shipment_id"`
	LineNumber int64   `spanner:"line_number"`
	Title      string  `spanner:"title"`
	Quantity   float64 `spanner:"quantity"`
	WeightKg   float64 `spanner:"weight_kg"`
	VolumeM3   float64 `spanner:"volume_m3"`
}

func (*LineItemsRow) ColumnExprs

func (*LineItemsRow) ColumnExprs() []spansql.Expr

func (*LineItemsRow) ColumnIDs

func (*LineItemsRow) ColumnIDs() []spansql.ID

func (*LineItemsRow) ColumnNames

func (*LineItemsRow) ColumnNames() []string

func (*LineItemsRow) Key

func (r *LineItemsRow) Key() LineItemsKey

func (*LineItemsRow) Mutate

func (r *LineItemsRow) Mutate() (string, []string, []interface{})

func (*LineItemsRow) MutateColumns

func (r *LineItemsRow) MutateColumns(columns []string) (string, []string, []interface{})

func (*LineItemsRow) MutatePresentColumns

func (r *LineItemsRow) MutatePresentColumns() (string, []string, []interface{})

func (*LineItemsRow) UnmarshalSpannerRow

func (r *LineItemsRow) UnmarshalSpannerRow(row *spanner.Row) error

func (*LineItemsRow) Validate

func (r *LineItemsRow) Validate() error

type LineItemsRowIterator

type LineItemsRowIterator interface {
	Next() (*LineItemsRow, error)
	Do(f func(row *LineItemsRow) error) error
	Stop()
}

type LineItemsTableDescriptor

type LineItemsTableDescriptor interface {
	TableName() string
	TableID() spansql.ID
	ColumnNames() []string
	ColumnIDs() []spansql.ID
	ColumnExprs() []spansql.Expr
	ShipperId() ColumnDescriptor
	ShipmentId() ColumnDescriptor
	LineNumber() ColumnDescriptor
	Title() ColumnDescriptor
	Quantity() ColumnDescriptor
	WeightKg() ColumnDescriptor
	VolumeM3() ColumnDescriptor
}

type ListIamPolicyBindingsRowsQuery

type ListIamPolicyBindingsRowsQuery struct {
	Where  spansql.BoolExpr
	Order  []spansql.Order
	Limit  int32
	Offset int64
	Params map[string]interface{}
}

type ListLineItemsRowsQuery

type ListLineItemsRowsQuery struct {
	Where  spansql.BoolExpr
	Order  []spansql.Order
	Limit  int32
	Offset int64
	Params map[string]interface{}
}

type ListShipmentsRowsQuery

type ListShipmentsRowsQuery struct {
	Where       spansql.BoolExpr
	Order       []spansql.Order
	Limit       int32
	Offset      int64
	Params      map[string]interface{}
	ShowDeleted bool
	LineItems   bool
}

type ListShippersRowsQuery

type ListShippersRowsQuery struct {
	Where       spansql.BoolExpr
	Order       []spansql.Order
	Limit       int32
	Offset      int64
	Params      map[string]interface{}
	ShowDeleted bool
}

type ListSitesRowsQuery

type ListSitesRowsQuery struct {
	Where       spansql.BoolExpr
	Order       []spansql.Order
	Limit       int32
	Offset      int64
	Params      map[string]interface{}
	ShowDeleted bool
}

type ReadTransaction

type ReadTransaction struct {
	Tx SpannerReadTransaction
}

func (ReadTransaction) BatchGetIamPolicyBindingsRows

func (ReadTransaction) BatchGetLineItemsRows

func (t ReadTransaction) BatchGetLineItemsRows(
	ctx context.Context,
	query BatchGetLineItemsRowsQuery,
) (map[LineItemsKey]*LineItemsRow, error)

func (ReadTransaction) BatchGetShipmentsRows

func (t ReadTransaction) BatchGetShipmentsRows(
	ctx context.Context,
	query BatchGetShipmentsRowsQuery,
) (map[ShipmentsKey]*ShipmentsRow, error)

func (ReadTransaction) BatchGetShippersRows

func (t ReadTransaction) BatchGetShippersRows(
	ctx context.Context,
	query BatchGetShippersRowsQuery,
) (map[ShippersKey]*ShippersRow, error)

func (ReadTransaction) BatchGetSitesRows

func (t ReadTransaction) BatchGetSitesRows(
	ctx context.Context,
	query BatchGetSitesRowsQuery,
) (map[SitesKey]*SitesRow, error)

func (ReadTransaction) GetIamPolicyBindingsRow

func (t ReadTransaction) GetIamPolicyBindingsRow(
	ctx context.Context,
	query GetIamPolicyBindingsRowQuery,
) (*IamPolicyBindingsRow, error)

func (ReadTransaction) GetLineItemsRow

func (t ReadTransaction) GetLineItemsRow(
	ctx context.Context,
	query GetLineItemsRowQuery,
) (*LineItemsRow, error)

func (ReadTransaction) GetShipmentsRow

func (t ReadTransaction) GetShipmentsRow(
	ctx context.Context,
	query GetShipmentsRowQuery,
) (*ShipmentsRow, error)

func (ReadTransaction) GetShippersRow

func (t ReadTransaction) GetShippersRow(
	ctx context.Context,
	query GetShippersRowQuery,
) (*ShippersRow, error)

func (ReadTransaction) GetSitesRow

func (t ReadTransaction) GetSitesRow(
	ctx context.Context,
	query GetSitesRowQuery,
) (*SitesRow, error)

func (ReadTransaction) ListIamPolicyBindingsRows

func (ReadTransaction) ListLineItemsRows

func (t ReadTransaction) ListLineItemsRows(
	ctx context.Context,
	query ListLineItemsRowsQuery,
) LineItemsRowIterator

func (ReadTransaction) ListShipmentsRows

func (t ReadTransaction) ListShipmentsRows(
	ctx context.Context,
	query ListShipmentsRowsQuery,
) ShipmentsRowIterator

func (ReadTransaction) ListShippersRows

func (t ReadTransaction) ListShippersRows(
	ctx context.Context,
	query ListShippersRowsQuery,
) ShippersRowIterator

func (ReadTransaction) ListSitesRows

func (t ReadTransaction) ListSitesRows(
	ctx context.Context,
	query ListSitesRowsQuery,
) SitesRowIterator

func (ReadTransaction) ReadIamPolicyBindingsRows

func (t ReadTransaction) ReadIamPolicyBindingsRows(
	ctx context.Context,
	keySet spanner.KeySet,
) IamPolicyBindingsRowIterator

func (ReadTransaction) ReadLineItemsRows

func (t ReadTransaction) ReadLineItemsRows(
	ctx context.Context,
	keySet spanner.KeySet,
) LineItemsRowIterator

func (ReadTransaction) ReadShipmentsRows

func (t ReadTransaction) ReadShipmentsRows(
	ctx context.Context,
	keySet spanner.KeySet,
) ShipmentsRowIterator

func (ReadTransaction) ReadShippersRows

func (t ReadTransaction) ReadShippersRows(
	ctx context.Context,
	keySet spanner.KeySet,
) ShippersRowIterator

func (ReadTransaction) ReadSitesRows

func (t ReadTransaction) ReadSitesRows(
	ctx context.Context,
	keySet spanner.KeySet,
) SitesRowIterator

type ShipmentsKey

type ShipmentsKey struct {
	ShipperId  string
	ShipmentId string
}

func (ShipmentsKey) BoolExpr

func (k ShipmentsKey) BoolExpr() spansql.BoolExpr

func (ShipmentsKey) Delete

func (k ShipmentsKey) Delete() *spanner.Mutation

func (ShipmentsKey) Order

func (ShipmentsKey) Order() []spansql.Order

func (ShipmentsKey) SpannerKey

func (k ShipmentsKey) SpannerKey() spanner.Key

func (ShipmentsKey) SpannerKeySet

func (k ShipmentsKey) SpannerKeySet() spanner.KeySet

type ShipmentsRow

type ShipmentsRow struct {
	ShipperId            string               `spanner:"shipper_id"`
	ShipmentId           string               `spanner:"shipment_id"`
	CreateTime           time.Time            `spanner:"create_time"`
	UpdateTime           time.Time            `spanner:"update_time"`
	DeleteTime           spanner.NullTime     `spanner:"delete_time"`
	OriginSiteId         string               `spanner:"origin_site_id"`
	DestinationSiteId    string               `spanner:"destination_site_id"`
	PickupEarliestTime   time.Time            `spanner:"pickup_earliest_time"`
	PickupLatestTime     time.Time            `spanner:"pickup_latest_time"`
	DeliveryEarliestTime time.Time            `spanner:"delivery_earliest_time"`
	DeliveryLatestTime   time.Time            `spanner:"delivery_latest_time"`
	Annotations          []spanner.NullString `spanner:"annotations"`
	LineItems            []*LineItemsRow      `spanner:"line_items"`
}

func (*ShipmentsRow) ColumnExprs

func (*ShipmentsRow) ColumnExprs() []spansql.Expr

func (*ShipmentsRow) ColumnIDs

func (*ShipmentsRow) ColumnIDs() []spansql.ID

func (*ShipmentsRow) ColumnNames

func (*ShipmentsRow) ColumnNames() []string

func (*ShipmentsRow) Key

func (r *ShipmentsRow) Key() ShipmentsKey

func (*ShipmentsRow) Mutate

func (r *ShipmentsRow) Mutate() (string, []string, []interface{})

func (*ShipmentsRow) MutateColumns

func (r *ShipmentsRow) MutateColumns(columns []string) (string, []string, []interface{})

func (*ShipmentsRow) MutatePresentColumns

func (r *ShipmentsRow) MutatePresentColumns() (string, []string, []interface{})

func (*ShipmentsRow) UnmarshalSpannerRow

func (r *ShipmentsRow) UnmarshalSpannerRow(row *spanner.Row) error

func (*ShipmentsRow) Validate

func (r *ShipmentsRow) Validate() error

type ShipmentsRowIterator

type ShipmentsRowIterator interface {
	Next() (*ShipmentsRow, error)
	Do(f func(row *ShipmentsRow) error) error
	Stop()
}

type ShipmentsTableDescriptor

type ShipmentsTableDescriptor interface {
	TableName() string
	TableID() spansql.ID
	ColumnNames() []string
	ColumnIDs() []spansql.ID
	ColumnExprs() []spansql.Expr
	ShipperId() ColumnDescriptor
	ShipmentId() ColumnDescriptor
	CreateTime() ColumnDescriptor
	UpdateTime() ColumnDescriptor
	DeleteTime() ColumnDescriptor
	OriginSiteId() ColumnDescriptor
	DestinationSiteId() ColumnDescriptor
	PickupEarliestTime() ColumnDescriptor
	PickupLatestTime() ColumnDescriptor
	DeliveryEarliestTime() ColumnDescriptor
	DeliveryLatestTime() ColumnDescriptor
	Annotations() ColumnDescriptor
}

type ShippersKey

type ShippersKey struct {
	ShipperId string
}

func (ShippersKey) BoolExpr

func (k ShippersKey) BoolExpr() spansql.BoolExpr

func (ShippersKey) Delete

func (k ShippersKey) Delete() *spanner.Mutation

func (ShippersKey) Order

func (ShippersKey) Order() []spansql.Order

func (ShippersKey) SpannerKey

func (k ShippersKey) SpannerKey() spanner.Key

func (ShippersKey) SpannerKeySet

func (k ShippersKey) SpannerKeySet() spanner.KeySet

type ShippersRow

type ShippersRow struct {
	ShipperId   string           `spanner:"shipper_id"`
	CreateTime  time.Time        `spanner:"create_time"`
	UpdateTime  time.Time        `spanner:"update_time"`
	DeleteTime  spanner.NullTime `spanner:"delete_time"`
	DisplayName string           `spanner:"display_name"`
}

func (*ShippersRow) ColumnExprs

func (*ShippersRow) ColumnExprs() []spansql.Expr

func (*ShippersRow) ColumnIDs

func (*ShippersRow) ColumnIDs() []spansql.ID

func (*ShippersRow) ColumnNames

func (*ShippersRow) ColumnNames() []string

func (*ShippersRow) Key

func (r *ShippersRow) Key() ShippersKey

func (*ShippersRow) Mutate

func (r *ShippersRow) Mutate() (string, []string, []interface{})

func (*ShippersRow) MutateColumns

func (r *ShippersRow) MutateColumns(columns []string) (string, []string, []interface{})

func (*ShippersRow) MutatePresentColumns

func (r *ShippersRow) MutatePresentColumns() (string, []string, []interface{})

func (*ShippersRow) UnmarshalSpannerRow

func (r *ShippersRow) UnmarshalSpannerRow(row *spanner.Row) error

func (*ShippersRow) Validate

func (r *ShippersRow) Validate() error

type ShippersRowIterator

type ShippersRowIterator interface {
	Next() (*ShippersRow, error)
	Do(f func(row *ShippersRow) error) error
	Stop()
}

type ShippersTableDescriptor

type ShippersTableDescriptor interface {
	TableName() string
	TableID() spansql.ID
	ColumnNames() []string
	ColumnIDs() []spansql.ID
	ColumnExprs() []spansql.Expr
	ShipperId() ColumnDescriptor
	CreateTime() ColumnDescriptor
	UpdateTime() ColumnDescriptor
	DeleteTime() ColumnDescriptor
	DisplayName() ColumnDescriptor
}

type SitesKey

type SitesKey struct {
	ShipperId string
	SiteId    string
}

func (SitesKey) BoolExpr

func (k SitesKey) BoolExpr() spansql.BoolExpr

func (SitesKey) Delete

func (k SitesKey) Delete() *spanner.Mutation

func (SitesKey) Order

func (SitesKey) Order() []spansql.Order

func (SitesKey) SpannerKey

func (k SitesKey) SpannerKey() spanner.Key

func (SitesKey) SpannerKeySet

func (k SitesKey) SpannerKeySet() spanner.KeySet

type SitesRow

type SitesRow struct {
	ShipperId   string              `spanner:"shipper_id"`
	SiteId      string              `spanner:"site_id"`
	CreateTime  time.Time           `spanner:"create_time"`
	UpdateTime  time.Time           `spanner:"update_time"`
	DeleteTime  spanner.NullTime    `spanner:"delete_time"`
	DisplayName string              `spanner:"display_name"`
	Latitude    spanner.NullFloat64 `spanner:"latitude"`
	Longitude   spanner.NullFloat64 `spanner:"longitude"`
}

func (*SitesRow) ColumnExprs

func (*SitesRow) ColumnExprs() []spansql.Expr

func (*SitesRow) ColumnIDs

func (*SitesRow) ColumnIDs() []spansql.ID

func (*SitesRow) ColumnNames

func (*SitesRow) ColumnNames() []string

func (*SitesRow) Key

func (r *SitesRow) Key() SitesKey

func (*SitesRow) Mutate

func (r *SitesRow) Mutate() (string, []string, []interface{})

func (*SitesRow) MutateColumns

func (r *SitesRow) MutateColumns(columns []string) (string, []string, []interface{})

func (*SitesRow) MutatePresentColumns

func (r *SitesRow) MutatePresentColumns() (string, []string, []interface{})

func (*SitesRow) UnmarshalSpannerRow

func (r *SitesRow) UnmarshalSpannerRow(row *spanner.Row) error

func (*SitesRow) Validate

func (r *SitesRow) Validate() error

type SitesRowIterator

type SitesRowIterator interface {
	Next() (*SitesRow, error)
	Do(f func(row *SitesRow) error) error
	Stop()
}

type SitesTableDescriptor

type SitesTableDescriptor interface {
	TableName() string
	TableID() spansql.ID
	ColumnNames() []string
	ColumnIDs() []spansql.ID
	ColumnExprs() []spansql.Expr
	ShipperId() ColumnDescriptor
	SiteId() ColumnDescriptor
	CreateTime() ColumnDescriptor
	UpdateTime() ColumnDescriptor
	DeleteTime() ColumnDescriptor
	DisplayName() ColumnDescriptor
	Latitude() ColumnDescriptor
	Longitude() ColumnDescriptor
}

type SpannerReadTransaction

type SpannerReadTransaction interface {
	Read(ctx context.Context, table string, keys spanner.KeySet, columns []string) *spanner.RowIterator
	ReadRow(ctx context.Context, table string, key spanner.Key, columns []string) (*spanner.Row, error)
	Query(ctx context.Context, statement spanner.Statement) *spanner.RowIterator
}

Jump to

Keyboard shortcuts

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