// ------------------------------------------------------------------------ // Project atila // Active Thing (activething.com) git.activething.com/go // // File name object_packer.go // Created by DEV // Modified 23/01/2024 // // Copyright 2024 activething.com // ------------------------------------------------------------------------ // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // ------------------------------------------------------------------------ package packs import "time" type ( ObjectPackBuilder interface { Error () error FieldAny (name string, value any, flags Flags) FieldRaw (name string, value []byte, flags Flags) FieldBinary (name string, value []byte, flags Flags) FieldString (name string, value string, flags Flags) FieldBool (name string, value bool, flags Flags) FieldInt8 (name string, value int8 , flags Flags) FieldInt16 (name string, value int16, flags Flags) FieldInt32 (name string, value int32, flags Flags) FieldInt64 (name string, value int64, flags Flags) FieldUInt8 (name string, value uint8, flags Flags) FieldUInt16 (name string, value uint16, flags Flags) FieldUInt32 (name string, value uint32, flags Flags) FieldUInt64 (name string, value uint64, flags Flags) FieldFloat32 (name string, value float32, flags Flags) FieldFloat64 (name string, value float64, flags Flags) FieldDate (name string, value time.Time, flags Flags) FieldList (name string, builder func(ListPackBuilder, Flags), flags Flags) FieldMap (name string, builder func(MapPackBuilder, Flags), flags Flags) FieldObject(name string, builder func(ObjectPackBuilder,Flags), flags Flags) } )